/* ---------------------------------------------------------
   Forthen
   Palette:  ink navy #0a1e3c   royal blue #1e50dc
   Type:     Fraunces (display serif) + Inter (sans)
--------------------------------------------------------- */

:root {
  --ink: #0a1e3c;
  --ink-soft: #2a3a55;
  --ink-muted: #5a6677;
  --blue: #1e50dc;
  --blue-dark: #173fb0;
  --paper: #fbfaf7;
  --paper-tint: #f2f1ec;
  --line: #e4e2db;
  --white: #ffffff;

  --maxw: 1140px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.container-narrow { max-width: 760px; }

/* ----------------- Navigation ----------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
  padding: 1.25rem 0;
}
.nav.scrolled {
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding: 0.7rem 0;
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: inline-flex; align-items: center; gap: 0.55rem; }
.logo-word {
  font-family: var(--serif); font-weight: 600; font-size: 1.65rem; line-height: 1;
  color: var(--ink); letter-spacing: 0.005em;
}
.logo-arrow { width: 34px; height: auto; flex: 0 0 auto; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-size: 0.95rem; font-weight: 500; color: var(--ink-soft);
  position: relative; transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0;
  background: var(--blue); transition: width 0.25s ease;
}
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  background: var(--ink); color: var(--white) !important;
  padding: 0.55rem 1.15rem; border-radius: 999px; font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
}
.nav-cta:hover { background: var(--blue); transform: translateY(-1px); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 30px; height: 22px; position: relative; }
.nav-toggle span { position: absolute; left: 0; height: 2px; width: 100%; background: var(--ink); transition: 0.3s ease; }
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 10px; }
.nav-toggle span:nth-child(3) { top: 20px; }
.nav-toggle.open span:nth-child(1) { top: 10px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

/* ----------------- Hero ----------------- */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 8rem var(--pad) 4rem;
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(30,80,220,0.07), transparent 70%),
    var(--paper);
}
.hero-inner { max-width: 880px; }
.eyebrow {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 1.5rem;
}
.eyebrow-light { color: #8fb0ff; }
.hero-title {
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  color: var(--ink); margin-bottom: 1.6rem;
}
.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-muted); max-width: 660px; margin: 0 auto 2.4rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-scroll {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted);
}
.hero-arrow { width: 1px; height: 38px; background: var(--ink-muted); position: relative; overflow: hidden; }
.hero-arrow::after {
  content: ""; position: absolute; top: -100%; left: 0; width: 100%; height: 100%;
  background: var(--blue); animation: scrolldrop 1.9s ease-in-out infinite;
}
@keyframes scrolldrop { 0% { top: -100%; } 60%,100% { top: 100%; } }

/* ----------------- Buttons ----------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.7rem; border-radius: 999px; font-weight: 500; font-size: 0.98rem;
  cursor: pointer; border: 1px solid transparent; transition: all 0.22s ease;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(30,80,220,0.28); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--blue); color: var(--white); transform: translateY(-2px); }

/* ----------------- Sections ----------------- */
.section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section-tint { background: var(--paper-tint); }
.section-head { max-width: 760px; margin-bottom: 3.5rem; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); color: var(--ink); margin-bottom: 1.2rem; }
.lede { font-size: 1.12rem; color: var(--ink-muted); }

/* ----------------- Flow (workflow > function > automate) ----------------- */
.flow { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.flow-step {
  flex: 1; min-width: 220px; background: var(--white); border: 1px solid var(--line);
  border-radius: 16px; padding: 2rem 1.8rem; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.flow-step:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(10,30,60,0.08); }
.flow-step-accent { background: var(--ink); color: var(--white); border-color: var(--ink); }
.flow-step-accent h3, .flow-step-accent .flow-num { color: var(--white); }
.flow-step-accent p { color: #c4d0e4; }
.flow-num { font-family: var(--serif); font-size: 1.1rem; color: var(--blue); display: block; margin-bottom: 0.8rem; }
.flow-step h3 { font-size: 1.45rem; margin-bottom: 0.7rem; }
.flow-step p { color: var(--ink-muted); font-size: 0.98rem; }
.flow-connector {
  align-self: center; width: 48px; height: 2px; background: var(--line); position: relative; flex: 0 0 auto;
}
.flow-connector::after {
  content: ""; position: absolute; right: -2px; top: -4px;
  border-left: 9px solid var(--blue); border-top: 5px solid transparent; border-bottom: 5px solid transparent;
}

/* ----------------- Cards ----------------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 4rem; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 2.2rem 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(10,30,60,0.08); }
.card h3 { font-size: 1.4rem; margin-bottom: 0.8rem; color: var(--ink); }
.card p { color: var(--ink-muted); }

/* ----------------- Workflow grid ----------------- */
.workflow-title { font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--ink); }
.workflow-list {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.workflow-list li {
  background: var(--paper); padding: 1.4rem 1.3rem; font-weight: 500; color: var(--ink-soft);
  font-size: 1rem; transition: background 0.25s ease, color 0.25s ease;
}
.section-tint .workflow-list li { background: var(--paper-tint); }
.workflow-list li:hover { background: var(--blue); color: var(--white); }

/* ----------------- Tools ----------------- */
.tool-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.tool-col { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 2.2rem 2rem; }
.tool-col h3 {
  font-size: 1.5rem; color: var(--ink); margin-bottom: 1.2rem;
  padding-bottom: 0.9rem; border-bottom: 1px solid var(--line);
}
.tool-col ul { list-style: none; }
.tool-col li { padding: 0.5rem 0 0.5rem 1.5rem; position: relative; color: var(--ink-muted); }
.tool-col li::before {
  content: ""; position: absolute; left: 0; top: 0.95rem; width: 9px; height: 1px; background: var(--blue);
}

/* ----------------- Dark section (hiring) ----------------- */
.section-dark { background: var(--ink); color: var(--white); }
.section-dark .section-head h2 { color: var(--white); }
.section-dark .lede { color: #c4d0e4; }

.hiring-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.hiring-profile h3 { font-size: 1.6rem; color: var(--white); margin-bottom: 1.5rem; }
.check-list { list-style: none; }
.check-list li {
  position: relative; padding: 0.7rem 0 0.7rem 2rem; color: #d4ddec;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 1.15rem;
  width: 12px; height: 7px; border-left: 2px solid #8fb0ff; border-bottom: 2px solid #8fb0ff;
  transform: rotate(-45deg);
}

/* ----------------- Forms ----------------- */
.form-card { background: var(--white); border-radius: 18px; padding: 2.5rem; box-shadow: 0 24px 60px rgba(10,30,60,0.10); }
.section-dark .form-card { color: var(--ink); }
.form-card h3 { font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--ink); }
.form-note { color: var(--ink-muted); margin-bottom: 1.5rem; font-size: 0.95rem; }
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.01em; }
.field input, .field textarea {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.8rem 0.95rem; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,80,220,0.12); background: var(--white);
}
.field textarea { resize: vertical; }
.field input[type="file"] { padding: 0.6rem; cursor: pointer; }
.form .btn { margin-top: 0.4rem; align-self: flex-start; }
.form-status { font-size: 0.92rem; min-height: 1.2em; }
.form-status.ok { color: #1a8f4a; }
.form-status.err { color: #c0392b; }

/* ----------------- Contact ----------------- */
.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 3rem; align-items: start; }
.contact-aside h3 { font-size: 1.5rem; margin-bottom: 0.8rem; }
.contact-aside p { color: var(--ink-muted); }
.contact-email {
  display: inline-block; font-family: var(--serif); font-size: 1.45rem; color: var(--blue);
  margin: 0.8rem 0 1.6rem; border-bottom: 1px solid transparent; transition: border-color 0.2s ease;
}
.contact-email:hover { border-color: var(--blue); }
.contact-meta { font-size: 0.95rem; }

/* ----------------- FAQ ----------------- */
.faq { display: flex; flex-direction: column; gap: 0.8rem; }
.faq-item {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 0 1.4rem;
  transition: box-shadow 0.25s ease;
}
.faq-item[open] { box-shadow: 0 10px 30px rgba(10,30,60,0.07); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1.2rem 0; font-weight: 600; font-size: 1.08rem;
  color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-family: var(--serif); font-size: 1.5rem; color: var(--blue); transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--ink-muted); padding-bottom: 1.3rem; }
.faq-more { text-align: center; color: var(--ink-muted); margin-top: 2rem; font-size: 0.95rem; }

/* ----------------- Footer ----------------- */
.footer { background: var(--paper-tint); border-top: 1px solid var(--line); padding: 3.5rem 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; text-align: center; }
.footer-logo { display: inline-flex; align-items: center; gap: 0.5rem; }
.footer-logo .logo-word { font-size: 1.5rem; }
.footer-tag { color: var(--ink-soft); font-family: var(--serif); font-size: 1.1rem; }
.footer-copy { color: var(--ink-muted); font-size: 0.88rem; }

/* ----------------- Thank you page ----------------- */
.thanks { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem var(--pad); }
.thanks-inner { max-width: 560px; }
.thanks .nav-logo { justify-content: center; margin-bottom: 2.5rem; }
.thanks h1 { font-size: clamp(2.6rem, 6vw, 4rem); color: var(--ink); margin-bottom: 1rem; }
.thanks p { font-size: 1.15rem; color: var(--ink-muted); margin-bottom: 2rem; }

/* ----------------- Reveal animation ----------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .hero-arrow::after { animation: none; }
}

/* ----------------- Responsive ----------------- */
@media (max-width: 900px) {
  .cards, .tool-cols { grid-template-columns: 1fr; }
  .workflow-list { grid-template-columns: repeat(2, 1fr); }
  .hiring-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .flow-connector { transform: rotate(90deg); margin: 0.5rem auto; }
  .flow { flex-direction: column; align-items: stretch; }

  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    background: var(--paper); flex-direction: column; align-items: flex-start;
    justify-content: center; gap: 1.8rem; padding: 2rem 2.5rem;
    transform: translateX(100%); transition: transform 0.35s ease; box-shadow: -10px 0 40px rgba(10,30,60,0.12);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.15rem; }
  .nav-toggle { display: block; z-index: 60; }
}

@media (max-width: 520px) {
  .workflow-list { grid-template-columns: 1fr; }
  .form-card { padding: 1.6rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
}
