/* Big Friendly Company — single-page site
   Blue/purple on deep navy. White primary text, blue-gray secondary. */

:root {
  --bg:            #070b1a;
  --bg-alt:        #0a0f24;
  --panel:         rgba(255, 255, 255, 0.045);
  --panel-strong:  rgba(255, 255, 255, 0.07);
  --border:        rgba(140, 165, 255, 0.16);
  --border-strong: rgba(140, 165, 255, 0.32);

  --text:          #ffffff;
  --text-soft:     #b9c6e6;
  --text-muted:    #8b9ac2;

  --blue:          #4c7dff;
  --blue-bright:   #6f9bff;
  --purple:        #8b5cf6;
  --purple-bright: #a78bfa;

  --grad: linear-gradient(120deg, var(--blue) 0%, var(--purple) 100%);
  --glow-blue: rgba(76, 125, 255, 0.35);
  --glow-purple: rgba(139, 92, 246, 0.3);

  --shell: 1180px;
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 72px;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--text);
}

h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.16rem; letter-spacing: -0.01em; }

p { margin: 0 0 1.1em; color: var(--text-soft); }
p:last-child { margin-bottom: 0; }

a { color: var(--blue-bright); text-decoration: none; }

::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }

:focus-visible {
  outline: 2px solid var(--purple-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  background: var(--bg-alt);
  color: var(--text);
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.skip-link:focus { left: 16px; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(7, 11, 26, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-size: 1.02rem; }

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav > a {
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  transition: color 0.2s var(--ease);
}

.nav > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1.5px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}

.nav > a:not(.btn):hover { color: var(--text); }
.nav > a:not(.btn):hover::after { transform: scaleX(1); }

/* Header CTA: a quiet outlined pill that fills with the gradient on hover,
   rather than a bright gradient blob competing with the nav links. */
.nav-cta {
  position: relative;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-strong);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  isolation: isolate;
}

.nav-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.28s var(--ease);
}

.nav-cta:hover {
  border-color: transparent;
  box-shadow: 0 10px 26px -14px var(--glow-blue);
}

.nav-cta:hover::before { opacity: 1; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  cursor: pointer;
  padding: 0;
  place-items: center;
  align-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.6px;
  background: var(--text);
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.97rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.28s var(--ease),
              background-color 0.24s var(--ease), border-color 0.24s var(--ease);
  white-space: nowrap;
}

.btn-sm { padding: 9px 18px; font-size: 0.9rem; }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 28px -12px var(--glow-blue);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px -14px var(--glow-purple), 0 0 0 1px rgba(167, 139, 250, 0.35);
}

.btn-ghost {
  background: var(--panel);
  color: var(--text);
  border-color: var(--border-strong);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  background: var(--panel-strong);
  border-color: rgba(167, 139, 250, 0.5);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(100svh, 860px);
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 72px) 0 96px;
  isolation: isolate;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("/assets/pexels-irina-iriser-671618.jpg") 72% 40% / cover no-repeat;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Darken only behind the copy on the left; let the photo breathe on the right. */
  background:
    linear-gradient(90deg, rgba(7, 11, 26, 0.72) 0%, rgba(7, 11, 26, 0.45) 42%, rgba(7, 11, 26, 0.08) 72%, transparent 100%),
    linear-gradient(180deg, rgba(7, 11, 26, 0.35) 0%, transparent 22%, transparent 70%, var(--bg) 100%);
}

.hero-inner { position: relative; }

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple-bright);
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  max-width: 17ch;
  margin-bottom: 22px;
  text-shadow: 0 2px 30px rgba(7, 11, 26, 0.6);
}

.hero-sub {
  max-width: 56ch;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: #d4dcf4;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding: clamp(72px, 9vw, 120px) 0;
}

.section-alt { background: var(--bg-alt); }

.section-alt::before,
.section-alt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.section-alt::before { top: 0; }
.section-alt::after { bottom: 0; }

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(40px, 5vw, 60px);
}

.section-lede {
  font-size: 1.06rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.grid { display: grid; gap: 20px; }

.cards { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.work-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.approach-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.about-grid h2 { margin-bottom: 0; }
.about-body p { font-size: 1.04rem; }

/* Cards */

.card, .panel {
  position: relative;
  padding: 28px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
              background-color 0.3s var(--ease), box-shadow 0.35s var(--ease);
}

.card::after, .panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}

.card:hover, .panel:hover {
  transform: translateY(-4px);
  background: var(--panel-strong);
  box-shadow: 0 24px 50px -30px rgba(76, 125, 255, 0.55);
}

.card:hover::after, .panel:hover::after { opacity: 0.6; }

.card p, .panel p {
  font-size: 0.97rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 13px;
  background: linear-gradient(140deg, rgba(76, 125, 255, 0.24), rgba(139, 92, 246, 0.24));
  border: 1px solid var(--border-strong);
  color: var(--blue-bright);
}

.card-icon svg { width: 22px; height: 22px; }

/* AI section */

.ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.ai-intro { position: sticky; top: calc(var(--header-h) + 32px); }

.ai-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}

.ai-list li {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.28s var(--ease), padding-left 0.28s var(--ease);
}

.ai-list li:last-child { border-bottom: 0; }

.ai-list li:hover {
  background: rgba(255, 255, 255, 0.05);
  padding-left: 30px;
}

.ai-list strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
  margin-bottom: 4px;
}

.ai-list span {
  display: block;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Work */

.work-card { display: flex; flex-direction: column; }

.work-kind {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple-bright);
  margin-bottom: 10px;
}

.work-card h3 { margin-bottom: 10px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.chips li {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.03);
}

/* Contact */

.contact { padding-bottom: clamp(88px, 10vw, 140px); }

.contact-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 68px);
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  background:
    radial-gradient(640px 320px at 12% 0%, rgba(76, 125, 255, 0.22), transparent 70%),
    radial-gradient(560px 340px at 92% 100%, rgba(139, 92, 246, 0.24), transparent 72%),
    rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
}

.contact-panel .section-lede { margin-inline: auto; max-width: 56ch; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 30px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-sm .brand-mark { width: 24px; height: 24px; }
.brand-sm .brand-name { font-size: 0.92rem; }

.footer-meta {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.footer-nav { display: flex; gap: 20px; }

.footer-nav a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}
.footer-nav a:hover { color: var(--text); }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .about-grid, .ai-grid { grid-template-columns: 1fr; }
  .ai-intro { position: static; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .shell { padding-inline: 16px; }

  .nav-toggle { display: grid; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 18px 16px 26px;
    background: rgba(7, 11, 26, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.26s var(--ease), transform 0.26s var(--ease), visibility 0.26s;
  }

  .nav.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav > a:not(.btn) {
    padding: 13px 4px;
    font-size: 1.02rem;
    border-bottom: 1px solid var(--border);
  }

  .nav > a:not(.btn)::after { display: none; }

  .nav > .btn { margin-top: 16px; width: 100%; }

  .hero { min-height: auto; padding: calc(var(--header-h) + 56px) 0 72px; }
  .hero-overlay {
    background: linear-gradient(180deg, rgba(7, 11, 26, 0.55) 0%, rgba(7, 11, 26, 0.5) 60%, var(--bg) 100%);
  }
  .hero-actions .btn { flex: 1 1 auto; }
  .card, .panel { padding: 24px 20px; }
  .footer-inner { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
