/* Company home. Black, white, and orange only. */

:root {
  --navy: #000000;
  --card: #111111;
  --orange: #F7931A;
  --ink: #ffffff;
  --body: #F1F5F9;
  --line: rgba(255, 255, 255, 0.06);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  --max: 1200px;
  --text: 640px;
  --radius: 24px;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  background: var(--navy);
  color: var(--body);
  font-family: Montserrat, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ink); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.home-text {
  max-width: var(--text);
}

.btn-orange {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  padding: 12px 28px;
  border: 0;
  border-radius: 12px;
  background: var(--orange);
  color: var(--navy);
  font: 700 18px/1 Montserrat, Helvetica, Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.home-text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.home-text-link .home-arrow {
  color: var(--orange);
}

/* Header: lockup left, links right. Overrides the global centered lockup only here. */
header.top.home-top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

header.top.home-top > .site-lockup {
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  order: 0;
  flex: 0 1 auto;
  width: auto;
  max-width: calc(100% - 72px);
  margin: 0;
  text-align: left;
}

header.top.home-top .brand-slogan {
  white-space: nowrap;
  font-size: 14px;
}

header.top.home-top .logo {
  width: 56px;
}

.home-menu {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: 700 16px/1 Montserrat, Helvetica, Arial, sans-serif;
  cursor: pointer;
}

.home-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 20px;
}

.home-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.home-nav a:hover,
.home-nav a:focus-visible {
  color: var(--orange);
}

.home-nav .nav-signin { color: var(--ink); }

/* Hero */
.home-hero {
  position: relative;
  overflow: hidden;
  padding: 32px 0 72px;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/assets/home/c1-grid-glow-bg-black.svg");
  background-size: cover;
  background-position: center;
  opacity: 0.06;
  pointer-events: none;
}

.home-hero::after {
  content: "";
  position: absolute;
  top: -18%;
  right: -12%;
  width: 56%;
  height: 70%;
  background: radial-gradient(circle, rgba(247, 147, 26, 0.22), transparent 70%);
  pointer-events: none;
}

.home-hero .home-wrap { position: relative; z-index: 1; }

.home-hero-stage {
  position: relative;
}

.home-hero-copy {
  position: relative;
  z-index: 2;
  padding: 8px 0 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
}

.home-hero-copy h1 {
  margin: 0 0 20px;
  color: var(--ink);
  font-size: 36px;
  line-height: 1.1;
  font-weight: 800;
}

.home-h1-accent { color: var(--orange); }

.home-hero-art {
  display: block;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: home-float 6s ease-in-out infinite;
}

.home-hero-art img {
  width: 100%;
  height: auto;
}

.home-sub {
  margin: 0 0 24px;
  max-width: var(--text);
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin: 0;
}

/* Offerings */
.home-section {
  padding: 72px 0;
}

.home-section-grid {
  position: relative;
}

.home-section-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/assets/home/c1-grid-glow-bg-black.svg");
  background-size: cover;
  background-position: center;
  opacity: 0.06;
  pointer-events: none;
}

.home-section-grid .home-wrap { position: relative; z-index: 1; }

h2 {
  margin: 0 0 32px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
}

h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
}

.home-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.home-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 400ms ease, border-top-color 400ms ease;
}

.home-card:hover,
.home-card:focus-within {
  transform: translateY(-4px);
  border-top-color: var(--orange);
}

.home-card-art {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #000000;
}

.home-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 24px;
}

.home-card-body h3 { font-size: 22px; }

.home-card-body p {
  margin: 0 0 16px;
}

.home-card-body .home-text-link { margin-top: auto; }

/* How it works */
.home-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.home-steps li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.home-steps img {
  width: 64px;
  height: 64px;
  margin: 0 0 16px;
}

.home-steps h3 { margin-bottom: 0; }

/* About Matthew: no portrait until a real photo is approved */
.home-about p {
  margin: 0 0 16px;
}

.home-about .btn-orange { margin-top: 8px; }

/* Research and media */
.home-media {
  list-style: none;
  margin: 0 0 48px;
  padding: 0;
  display: grid;
  gap: 16px;
}

.home-media a {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.home-media a:hover { border-color: var(--orange); }

.home-media img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.home-heard-title {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.home-heard {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
}

.home-heard img {
  height: 48px;
  width: auto;
  opacity: 0.7;
}

/* Footer */
footer.home-foot {
  padding: 32px 16px 48px;
  text-align: center;
  color: #94A3B8;
  font-size: 16px;
  background: #000000;
}

footer.home-foot a { color: var(--ink); }

footer.home-foot .social-link {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.28);
}

footer.home-foot .social-link:hover {
  color: var(--orange);
  background: rgba(247, 147, 26, 0.12);
  text-decoration: none;
}

/* Motion: stay visible until JS marks the page ready, then fade up. */
.home-reveal { opacity: 1; }

html.js .home-reveal {
  opacity: 0;
  transform: translateY(16px);
}

html.js .home-reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 400ms ease, transform 400ms ease;
  transition-delay: var(--d, 0ms);
}

@keyframes home-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (min-width: 768px) {
  .home-wrap { width: min(var(--max), calc(100% - 48px)); }
  .home-hero { padding: 40px 0 120px; }
  .home-hero-copy {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: min(var(--text), 46%);
    padding: 0;
  }
  .home-hero-copy h1 { font-size: 56px; }
  .home-section { padding: 120px 0; }
  h2 { font-size: 36px; }
  h3,
  .home-card-body h3 { font-size: 24px; }
  .home-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .home-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .home-media { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}

@media (max-width: 767px) {
  .home-hero-art { margin-bottom: 8px; }
  .home-menu { display: inline-flex; }

  .home-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
  }

  .home-nav.is-open { display: flex; }

  .home-nav a {
    width: 100%;
    min-height: 48px;
    border-top: 1px solid var(--line);
  }

  .btn-orange { width: 100%; }

  .home-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-art { animation: none; }
  .home-card,
  .home-card:hover,
  .home-card:focus-within { transition: none; transform: none; }
  .home-reveal,
  html.js .home-reveal,
  html.js .home-reveal.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
