/* ==========================================================================
   Foundry Key Nexus — shared stylesheet
   Palette derived from the FKN logo mark:
     ink    #1a1a1f  (near-black charcoal — logo card background)
     cream  #f4f3f0  (logo mark fill)
     accent #e8622c  (logo connector/node orange)
   ========================================================================== */

:root {
  --ink: #1a1a1f;
  --ink-2: #232329;
  --ink-3: #2c2c33;
  --line-on-ink: rgba(244, 243, 240, 0.12);
  --line-on-ink-strong: rgba(244, 243, 240, 0.22);
  --text-on-ink: #f4f3f0;
  --text-on-ink-muted: #ada9a1;

  --cream: #f4f3f0;
  --cream-2: #ebe9e4;
  --line-on-cream: rgba(26, 26, 31, 0.1);
  --line-on-cream-strong: rgba(26, 26, 31, 0.18);
  --text-on-cream: #1a1a1f;
  --text-on-cream-muted: #5c594f;

  --accent: #e8622c;
  --accent-hover: #ea6c3a; /* button hover — lighter, keeps ink button text >=4.5:1 */
  --accent-text: #ad4118; /* accent-colored text on light backgrounds — meets AA on white/cream */
  --accent-soft: rgba(232, 98, 44, 0.12);
  --accent-soft-strong: rgba(232, 98, 44, 0.22);

  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --max-width: 1180px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 20px 60px -30px rgba(26, 26, 31, 0.35);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--text-on-cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.4vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 1.6vw, 1.5rem); }

p { margin: 0 0 1em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1em;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.lede {
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  color: var(--text-on-cream-muted);
  max-width: 60ch;
}

.section-on-ink .lede { color: var(--text-on-ink-muted); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-align: center;
  /* no white-space:nowrap — a long label (e.g. "See deliverables & engagement
     models →") would rather wrap to two lines than force the page to scroll
     horizontally on narrow phones */
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--ink); /* ink-on-accent = 5.13:1 (AA); white-on-accent was only 3.38:1 */
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost-on-cream {
  background: transparent;
  color: var(--text-on-cream);
  border-color: var(--line-on-cream-strong);
}
.btn-ghost-on-cream:hover { border-color: var(--text-on-cream); }

.btn-ghost-on-ink {
  background: transparent;
  color: var(--text-on-ink);
  border-color: var(--line-on-ink-strong);
}
.btn-ghost-on-ink:hover { border-color: var(--text-on-ink); }

.btn-block { width: 100%; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(26, 26, 31, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-on-ink);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-on-ink);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--ink-2);
  border: 1px solid var(--line-on-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-mark svg { width: 22px; height: 22px; }

.brand small {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--text-on-ink-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

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

.main-nav a {
  font-size: 0.94rem;
  color: var(--text-on-ink-muted);
  transition: color 0.15s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--text-on-ink); }

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

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-on-ink-strong);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  color: var(--text-on-ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta .btn-primary { display: none; }

  .site-header.nav-open .main-nav {
    display: flex;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--line-on-ink);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 28px 20px;
  }

  .site-header.nav-open .main-nav a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--line-on-ink);
  }

  .site-header.nav-open .nav-cta .btn-primary {
    display: inline-flex;
    margin-top: 12px;
  }
}

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

.section {
  padding: 96px 0;
}

.section-tight { padding: 64px 0; }

.section-on-ink {
  background: var(--ink);
  color: var(--text-on-ink);
}

.section-on-ink-2 {
  background: var(--ink-2);
  color: var(--text-on-ink);
}

.section-header {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-header.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

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

.hero {
  background: var(--ink);
  color: var(--text-on-ink);
  padding: 84px 0 96px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-on-ink);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-on-ink-strong);
  color: var(--text-on-ink-muted);
}

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

.hero-visual {
  background: var(--ink-2);
  border: 1px solid var(--line-on-ink);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual svg { width: 100%; height: auto; max-width: 260px; }

/* ---------- Stat / differentiator strip ---------- */

.strip {
  background: var(--ink-2);
  border-top: 1px solid var(--line-on-ink);
  border-bottom: 1px solid var(--line-on-ink);
  color: var(--text-on-ink);
}

.strip .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

@media (max-width: 760px) {
  .strip .container { grid-template-columns: repeat(2, 1fr); }
}

.strip-item {
  padding: 32px 24px;
  border-right: 1px solid var(--line-on-ink);
}
.strip-item:last-child { border-right: none; }

@media (max-width: 760px) {
  .strip-item:nth-child(2n) { border-right: none; }
  .strip-item { border-bottom: 1px solid var(--line-on-ink); }
  .strip-item:nth-last-child(-n+2) { border-bottom: none; }
}

.strip-item .stat-icon { color: var(--accent); margin-bottom: 12px; }
.strip-item h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.strip-item p {
  font-size: 0.9rem;
  color: var(--text-on-ink-muted);
  margin: 0;
}

/* ---------- Cards / grids ---------- */

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

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid var(--line-on-cream);
  border-radius: var(--radius-md);
  padding: 30px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: var(--line-on-cream-strong);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.card-on-ink {
  background: var(--ink-2);
  border: 1px solid var(--line-on-ink);
  color: var(--text-on-ink);
}
.card-on-ink:hover { border-color: var(--line-on-ink-strong); }
.card-on-ink p { color: var(--text-on-ink-muted); }

.tag-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tag-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-on-cream-muted);
}

.card-on-ink .tag-list li { color: var(--text-on-ink-muted); }

.tag-list li svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent);
}

.pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text); /* was accent-hover at 4.23:1 — accent-text clears AA at 5.15:1 */
  margin-bottom: 14px;
}

.card-on-ink .pill,
.section-on-ink .pill,
.section-on-ink-2 .pill {
  background: var(--accent-soft-strong);
  color: var(--accent);
}

/* ---------- Process steps ---------- */

.process-step {
  position: relative;
  padding-left: 56px;
}

.process-step .step-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.site-footer {
  background: var(--ink);
  color: var(--text-on-ink-muted);
  padding: 64px 0 32px;
  border-top: 1px solid var(--line-on-ink);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-on-ink);
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-grid h5 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-on-ink);
  margin: 0 0 16px;
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--text-on-ink); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.85rem;
}

.footer-bottom a:hover { color: var(--text-on-ink); }

/* ---------- Forms ---------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 620px) {
  .form-grid { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-on-ink);
}

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-on-ink-strong);
  background: var(--ink-2);
  color: var(--text-on-ink);
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--text-on-ink-muted); }

.form-note {
  font-size: 0.82rem;
  color: var(--text-on-ink-muted);
  margin-top: 14px;
}

.form-status {
  margin-top: 16px;
  font-size: 0.92rem;
  display: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}
.form-status.visible { display: block; }
.form-status.success { background: rgba(88, 179, 108, 0.15); color: #8fdba3; }
.form-status.error { background: rgba(232, 98, 44, 0.15); color: var(--accent-hover); }

/* ---------- Contact info tiles ---------- */

.contact-tile {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-on-ink);
}
.contact-tile:last-child { border-bottom: none; }

.contact-tile .card-icon { margin-bottom: 0; flex-shrink: 0; }

.obfuscated-email {
  font-family: var(--font-mono);
  color: var(--accent);
  word-break: break-all;
}

/* ---------- Ideation index ---------- */

.ideation-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ideation-thumb {
  aspect-ratio: 16/10;
  border-radius: var(--radius-sm);
  background: var(--cream-2);
  border: 1px solid var(--line-on-cream);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-on-cream-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  overflow: hidden;
}

.ideation-thumb img { width: 100%; height: 100%; object-fit: cover; }

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-on-cream-muted);
}
.status-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9c9890;
}
.status-dot.status-review::before { background: #e0a028; }
.status-dot.status-approved::before { background: #4caf6b; }
.status-dot.status-live::before { background: var(--accent); }

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-band h2 { margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,0.85); margin: 0; }
.cta-band .btn-primary { background: var(--ink); color: var(--cream); }
.cta-band .btn-primary:hover { background: #000; color: var(--cream); }

/* ---------- Misc utility ---------- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.muted-on-cream { color: var(--text-on-cream-muted); }
.muted-on-ink { color: var(--text-on-ink-muted); }

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ---------- Logo mark animation (from FKN brand asset) ---------- */

.logo-mark .spoke {
  stroke: var(--accent);
  stroke-width: 3;
  fill: none;
  stroke-dasharray: 1;
  stroke-linecap: round;
  animation: draw 3.6s ease-in-out infinite;
}
.logo-mark .node {
  animation: pop 3.6s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.logo-mark .s1 { animation-delay: 0s; }
.logo-mark .n1 { animation-delay: 0s; }
.logo-mark .s2 { animation-delay: .15s; }
.logo-mark .n2 { animation-delay: .15s; }
.logo-mark .s3 { animation-delay: .3s; }
.logo-mark .n3 { animation-delay: .3s; }

@keyframes draw {
  0% { stroke-dashoffset: 1; opacity: .25; }
  14% { opacity: 1; }
  38% { stroke-dashoffset: 0; }
  70% { stroke-dashoffset: 0; opacity: 1; }
  84% { stroke-dashoffset: 0; opacity: 0; }
  85% { stroke-dashoffset: 1; opacity: 0; }
  100% { stroke-dashoffset: 1; opacity: .25; }
}

@keyframes pop {
  0% { opacity: 0; transform: scale(.3); }
  35% { opacity: 0; transform: scale(.3); }
  42% { opacity: 1; transform: scale(1); }
  70% { opacity: 1; transform: scale(1); }
  84% { opacity: 0; transform: scale(.6); }
  100% { opacity: 0; transform: scale(.3); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-mark .spoke, .logo-mark .node { animation: none; opacity: 1; stroke-dashoffset: 0; }
}
