/* =========================================================
   Fidna — Design Tokens
   ========================================================= */
:root{
  --brand:        #74B98D;
  --brand-dark:   #5A9C72;
  --success:      #5EA271;
  --logo:         #18160F;
  --logo-light:   #FFFFFF;
  --page:         #F2F0E8;
  --ink:          #18160F;
  --muted:        #7A7568;
  --page-warm:    #E8E3D5;
  --olive:        #8E8660;
  --brand-light:  #B8DFC6;

  --border: rgba(24,22,15,0.10);
  --border-strong: rgba(24,22,15,0.16);
  --shadow-soft: 0 2px 10px rgba(24,22,15,0.05);
  --shadow-card: 0 6px 24px rgba(24,22,15,0.06);

  --font-display: 'Vazirmatn', -apple-system, sans-serif;
  --font-body: 'Vazirmatn', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --max-w: 1180px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; scroll-behavior:auto !important; }
}

body{
  margin:0;
  background:var(--page);
  color:var(--ink);
  font-family:var(--font-body);
  font-feature-settings:"ss01";
  line-height:1.7;
  font-size:16px;
  -webkit-font-smoothing:antialiased;
}

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

.skip-link{
  position:absolute; right:-999px; top:auto;
  background:var(--ink); color:var(--logo-light);
  padding:12px 18px; border-radius:8px; z-index:1000;
}
.skip-link:focus{ right:16px; top:16px; }

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

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

.wrap{
  max-width:var(--max-w);
  margin:0 auto;
  padding:0 28px;
}
.wrap-narrow{ max-width:720px; }

.center{ text-align:center; }

.eyebrow{
  font-family:var(--font-mono);
  font-size:12.5px;
  letter-spacing:0.09em;
  color:var(--olive);
  margin:0 0 14px;
  text-transform:uppercase;
  direction:ltr;
}
.eyebrow.center{ text-align:center; }

.section-title{
  font-size:clamp(28px,3.4vw,40px);
  line-height:1.28;
  letter-spacing:-0.01em;
  margin:0 0 14px;
  font-weight:650;
}
.section-subtitle{
  color:var(--muted);
  font-size:17px;
  max-width:560px;
  margin:0 auto 46px;
}

.section{ padding:104px 0; }
@media (max-width:720px){ .section{ padding:72px 0; } }

/* =========================================================
   Buttons
   ========================================================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:13px 24px;
  border-radius:12px;
  font-size:15px;
  font-weight:600;
  border:1px solid transparent;
  cursor:pointer;
  transition:transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space:nowrap;
}
.btn:active{ transform:translateY(1px); }

.btn-primary{
  background:var(--ink);
  color:var(--logo-light);
}
.btn-primary:hover{ background:#2b2818; }

.btn-ghost{
  background:transparent;
  color:var(--ink);
  border-color:var(--border-strong);
}
.btn-ghost:hover{ background:rgba(24,22,15,0.04); }

.btn-lg{ padding:15px 30px; font-size:15.5px; }
.btn-block{ width:100%; }
.btn-nav{ padding:10px 20px; font-size:14px; }

.btn[disabled]{ opacity:0.6; cursor:not-allowed; }

/* =========================================================
   Header
   ========================================================= */
.site-header{
  position:sticky; top:0; z-index:100;
  background:rgba(242,240,232,0.86);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
}
.header-inner{
  display:flex;
  align-items:center;
  gap:32px;
  height:76px;
}
.logo{
  font-family:var(--font-mono);
  font-weight:600;
  font-size:19px;
  letter-spacing:0.01em;
  direction:ltr;
  color:var(--ink);
}
.main-nav{
  display:flex;
  gap:28px;
  margin-inline-start:auto;
  font-size:14.5px;
}
.main-nav a{ color:var(--muted); transition:color .15s ease; }
.main-nav a:hover{ color:var(--ink); }

.header-inner .btn-nav{ margin-inline-start:auto; }
.header-inner .main-nav + .btn-nav{ margin-inline-start:0; }

.menu-toggle{
  display:none;
  width:38px; height:38px;
  border-radius:9px;
  border:1px solid var(--border-strong);
  background:transparent;
  align-items:center; justify-content:center;
  flex-direction:column; gap:4px;
  cursor:pointer;
}
.menu-toggle span{ display:block; width:16px; height:1.5px; background:var(--ink); }

.mobile-nav{
  display:flex; flex-direction:column;
  gap:4px;
  padding:8px 28px 20px;
  border-top:1px solid var(--border);
}
.mobile-nav a{
  padding:12px 4px;
  color:var(--ink);
  border-bottom:1px solid var(--border);
  font-size:15px;
}
.mobile-nav .btn{ margin-top:12px; }

@media (max-width:880px){
  .main-nav, .btn-nav{ display:none; }
  .menu-toggle{ display:flex; margin-inline-start:auto; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero{ padding:96px 0 88px; overflow:hidden; }
.hero-grid{
  display:grid;
  grid-template-columns:1.05fr 0.95fr;
  gap:64px;
  align-items:center;
}
.hero-copy h1{
  font-size:clamp(34px,4.6vw,54px);
  line-height:1.22;
  letter-spacing:-0.015em;
  margin:0 0 22px;
  font-weight:700;
}
.ink-brand{ color:var(--brand-dark); }

.lede{
  font-size:18px;
  color:var(--muted);
  max-width:520px;
  margin:0 0 34px;
}
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom:20px; }
.hero-note{
  font-family:var(--font-mono);
  font-size:12.5px;
  color:var(--olive);
  letter-spacing:0.03em;
}

@media (max-width:960px){
  .hero-grid{ grid-template-columns:1fr; gap:56px; }
}

/* ---- flow diagram ---- */
.hero-visual{ display:flex; justify-content:center; }
.flow{
  width:100%;
  max-width:340px;
  display:flex;
  flex-direction:column;
  align-items:center;
}
.flow-node{
  width:100%;
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:18px 20px;
  box-shadow:var(--shadow-card);
  display:flex;
  flex-direction:column;
  gap:4px;
  transition:transform .25s ease, box-shadow .25s ease;
}
.flow-node-label{ font-weight:650; font-size:16px; }
.flow-node-sub{
  font-family:var(--font-mono);
  font-size:11.5px;
  color:var(--muted);
  direction:ltr;
  text-align:right;
}
.flow-node-brand{
  border-color:var(--brand);
  background:var(--brand-light);
}
.flow-node-brand .flow-node-sub{ color:var(--brand-dark); }
.flow-node-success{ border-color:var(--success); }

.flow-node.is-active{ transform:scale(1.03); box-shadow:0 10px 28px rgba(24,22,15,0.10); }

.flow-connector{
  position:relative;
  height:44px;
  width:2px;
  background:var(--border-strong);
  margin:2px 0;
}
.flow-dot{
  position:absolute;
  top:-4px; right:-4px;
  width:10px; height:10px;
  border-radius:50%;
  background:var(--brand);
  opacity:0;
}
.flow-connector.is-flowing .flow-dot{
  animation:flow-move 1.1s ease-in-out forwards;
}
@keyframes flow-move{
  0%{ opacity:0; top:-4px; }
  15%{ opacity:1; }
  85%{ opacity:1; }
  100%{ opacity:0; top:38px; }
}

/* =========================================================
   Problem / compare
   ========================================================= */
.compare-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px;
  margin-top:8px;
}
.compare-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:36px 34px;
}
.compare-card-featured{
  border-color:var(--brand);
  background:var(--brand-light);
}
.compare-label{
  font-family:var(--font-mono);
  font-size:12.5px;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:var(--muted);
  margin:0 0 20px;
}
.compare-label-brand{ color:var(--brand-dark); }
.compare-steps{
  list-style:none;
  margin:0 0 24px;
  padding:0;
  counter-reset:step;
}
.compare-steps li{
  position:relative;
  padding-inline-start:26px;
  padding-block:9px;
  border-bottom:1px solid rgba(24,22,15,0.08);
  font-size:15.5px;
}
.compare-steps li:last-child{ border-bottom:none; }
.compare-steps li::before{
  counter-increment:step;
  content:counter(step);
  position:absolute;
  inset-inline-start:0;
  top:9px;
  font-family:var(--font-mono);
  font-size:12px;
  color:var(--olive);
}
.compare-verdict{ margin:0; font-weight:650; font-size:15.5px; }
.compare-verdict-muted{ color:var(--muted); }
.compare-verdict-brand{ color:var(--brand-dark); }

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

/* =========================================================
   Features
   ========================================================= */
.feature-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:20px;
  margin-top:8px;
}
.feature-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:28px 24px;
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature-card:hover{
  transform:translateY(-3px);
  box-shadow:var(--shadow-card);
  border-color:var(--border-strong);
}
.feature-icon{
  display:inline-flex;
  align-items:center; justify-content:center;
  width:40px; height:40px;
  border-radius:10px;
  background:var(--page-warm);
  color:var(--brand-dark);
  margin-bottom:16px;
}
.feature-icon svg{ width:20px; height:20px; }
.feature-card h3{ font-size:16.5px; margin:0 0 8px; font-weight:650; }
.feature-card p{ font-size:14.5px; color:var(--muted); margin:0; line-height:1.65; }

@media (max-width:980px){ .feature-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .feature-grid{ grid-template-columns:1fr; } }

/* =========================================================
   How it works — timeline
   ========================================================= */
.timeline{
  list-style:none;
  margin:0 auto;
  padding:0;
  max-width:640px;
  position:relative;
}
.timeline::before{
  content:"";
  position:absolute;
  inset-inline-start:19px;
  top:8px; bottom:8px;
  width:1.5px;
  background:var(--border-strong);
}
.timeline-step{
  position:relative;
  display:flex;
  align-items:flex-start;
  gap:20px;
  padding:14px 0;
}
.timeline-marker{
  position:relative; z-index:1;
  flex:none;
  width:40px; height:40px;
  border-radius:50%;
  background:#fff;
  border:1.5px solid var(--brand);
  color:var(--brand-dark);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-mono);
  font-weight:600;
  font-size:14px;
}
.timeline-content{ padding-top:8px; }
.timeline-content p{ margin:0; font-size:16px; }

/* =========================================================
   Trust
   ========================================================= */
.trust{ background:var(--page-warm); }
.trust-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:36px;
  margin-top:12px;
}
.trust-col{ text-align:center; }
.trust-col h3{ font-size:18px; margin:0 0 10px; font-weight:650; }
.trust-col p{ color:var(--muted); font-size:14.5px; margin:0; max-width:320px; margin-inline:auto; }

@media (max-width:760px){ .trust-grid{ grid-template-columns:1fr; gap:32px; } }

/* =========================================================
   FAQ
   ========================================================= */
.faq-list{ display:flex; flex-direction:column; gap:12px; margin-top:12px; }
.faq-item{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:6px 22px;
}
.faq-item summary{
  cursor:pointer;
  padding:16px 0;
  font-weight:600;
  font-size:15.5px;
  list-style:none;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item summary::after{
  content:"+";
  font-family:var(--font-mono);
  color:var(--olive);
  font-size:18px;
  flex:none;
  margin-inline-start:16px;
}
.faq-item[open] summary::after{ content:"−"; }
.faq-item p{ margin:0 0 18px; color:var(--muted); font-size:14.5px; }

/* =========================================================
   Early access
   ========================================================= */
.early-access{ background:var(--page-warm); }
.ea-form{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:38px;
  display:flex;
  flex-direction:column;
  gap:20px;
  box-shadow:var(--shadow-card);
}
.field{ display:flex; flex-direction:column; gap:7px; text-align:right; }
.field label{ font-size:14px; font-weight:600; }
.field input, .field select{
  font-family:var(--font-body);
  font-size:15.5px;
  padding:12px 14px;
  border-radius:10px;
  border:1px solid var(--border-strong);
  background:var(--page);
  color:var(--ink);
}
.segmented-control {
  display: flex;
  border: 1px solid rgba(24, 22, 15, 0.16);
  border-radius: 0.75rem;
  overflow: hidden;
  width: fit-content;
}

.segmented-control input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.segmented-option {
  padding: 0.65rem 1.75rem;
  font-size: 0.95rem;
  color: var(--muted);
  background-color: var(--page);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.segmented-control input[type="radio"]:not(:first-of-type) + .segmented-option {
  border-right: 1px solid rgba(24, 22, 15, 0.16);
}

.segmented-option:hover {
  background-color: var(--page-warm);
}

.segmented-control input[type="radio"]:checked + .segmented-option {
  background-color: var(--brand);
  color: var(--logo-light);
}

.segmented-control input[type="radio"]:focus-visible + .segmented-option {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
.field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background-color: var(--page);
  border: 1px solid rgba(24, 22, 15, 0.16);
  border-radius: 0.75rem;
  resize: vertical;
  min-height: 4.5rem;
  transition: border-color 0.15s ease;
}

.field textarea:focus {
  outline: none;
  border-color: var(--brand);
}
.field input::placeholder{ color:var(--muted); direction:ltr; }
.field input:focus, .field select:focus{ outline:none; border-color:var(--brand-dark); background:#fff; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"]{ border-color:#B5493F; }
.field-error{ font-size:12.5px; color:#B5493F; min-height:16px; }

.ea-status{
  text-align:center;
  min-height:22px;
  font-size:14.5px;
  margin:0;
}
.ea-status.success{ color:var(--success); font-weight:600; }
.ea-status.error{ color:#B5493F; font-weight:600; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer{ border-top:1px solid var(--border); padding:40px 0; }
.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:16px;
}
.footer-copy{ color:var(--muted); font-size:13.5px; margin:0; }
.footer-links{ display:flex; gap:20px; font-size:13.5px; }
.footer-links a{ color:var(--muted); }
.footer-links a:hover{ color:var(--ink); }

/* =========================================================
   Scroll reveal
   ========================================================= */
.reveal{ opacity:0; transform:translateY(14px); transition:opacity .6s ease, transform .6s ease; }
.reveal.is-visible{ opacity:1; transform:none; }