/* ==========================================================================
   Varell Enterprises — design system
   Editorial consulting identity. Non-animated, calm, typographic.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Palette: deep ink green-black on warm paper, single emerald accent */
  --ink:        #0E1A17;
  --ink-2:      #16241F;
  --ink-soft:   #2A3733;
  --muted:      #6A736C;
  --paper:      #F5F3EE;
  --paper-2:    #EDEAE2;
  --card:       #FFFFFF;
  --line:       #D9D5C9;
  --line-soft:  #E6E2D8;
  --accent:     #1F6F52;
  --accent-ink: #17573F;
  --accent-wash:#E4EFE9;
  --focus:      #1F6F52;

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:    "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  /* Fluid type scale */
  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.90rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.20vw, 1.10rem);
  --step-1:  clamp(1.20rem, 1.13rem + 0.35vw, 1.42rem);
  --step-2:  clamp(1.50rem, 1.35rem + 0.75vw, 2.00rem);
  --step-3:  clamp(1.90rem, 1.60rem + 1.40vw, 2.90rem);
  --step-4:  clamp(2.40rem, 1.85rem + 2.60vw, 4.20rem);
  --step-5:  clamp(3.00rem, 2.10rem + 4.20vw, 6.00rem);

  /* Space */
  --sp-1: 0.5rem;
  --sp-2: 0.85rem;
  --sp-3: 1.25rem;
  --sp-4: 2rem;
  --sp-5: 3.25rem;
  --sp-6: 5rem;
  --sp-7: 7.5rem;

  --radius: 3px;
  --shadow: 0 1px 2px rgba(14,26,23,.04), 0 8px 28px rgba(14,26,23,.06);
  --measure: 68ch;
  --wrap: 1160px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 var(--sp-3);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); line-height: 1.15; }
h4 { font-size: var(--step-1); font-family: var(--sans); font-weight: 600; letter-spacing: -0.005em; }

p { margin: 0 0 var(--sp-3); max-width: var(--measure); text-wrap: pretty; }
p.lead { font-size: var(--step-1); line-height: 1.55; color: var(--ink-soft); }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

img, svg { max-width: 100%; display: block; }
ul, ol { margin: 0 0 var(--sp-3); padding-left: 1.15rem; }
li { margin-bottom: 0.4rem; max-width: var(--measure); }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-5) 0; }

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

::selection { background: var(--accent); color: #fff; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.15rem, 5vw, 2.5rem); }
.section { padding-block: clamp(3.5rem, 8vw, var(--sp-7)); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }
.section--ink p { color: #C9D2CD; }
.section--ink a { color: #9FD9C0; }
.section--paper2 { background: var(--paper-2); }
.section--line { border-top: 1px solid var(--line); }

.eyebrow {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--sp-2);
  display: block;
}
.section--ink .eyebrow { color: #7FCDAE; }

.grid { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: var(--sp-4); } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245,243,238,.86);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--ink); }
.brand svg { width: 26px; height: 26px; }
.brand-name { font-family: var(--display); font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1; }
.brand-name small { display: block; font-family: var(--sans); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 1.9rem); }
.nav a { font-size: var(--step--1); font-weight: 500; color: var(--ink-soft); text-decoration: none; letter-spacing: .01em; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"]:not(.nav-cta) { color: var(--ink); border-bottom: 1.5px solid var(--accent); padding-bottom: 2px; }
.nav .nav-cta {
  color: var(--paper); background: var(--ink);
  padding: 0.5rem 1rem; border-radius: var(--radius);
  border-bottom: 0;
}
.nav .nav-cta:hover { background: var(--accent-ink); color: #fff; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.4rem 0.6rem; cursor: pointer; color: var(--ink); }
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start;
         background: var(--paper); border-bottom: 1px solid var(--line); padding: var(--sp-3) clamp(1.15rem,5vw,2.5rem) var(--sp-4); gap: var(--sp-3); display: none; }
  .nav.open { display: flex; }
  .site-header .nav-cta { padding: .55rem 1rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-size: var(--step--1); font-weight: 600; letter-spacing: .01em;
  padding: 0.8rem 1.35rem; border-radius: var(--radius); text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); color: #fff; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--accent-ink); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--quiet { background: transparent; color: var(--accent-ink); border-color: var(--line); }
.btn--quiet:hover { border-color: var(--accent); background: var(--accent-wash); }
.btn--wide { width: 100%; justify-content: center; }
.arrow::after { content: "\2192"; display: inline-block; transition: transform .18s ease; }
.arrow:hover::after { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem); }
.hero h1 { max-width: 20ch; }
.hero .lead { max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.hero-aside { border-left: 1px solid var(--line); padding-left: var(--sp-4); }
.hero-aside hr { margin: var(--sp-3) 0; }
.hero-aside p { margin-bottom: 0; }
@media (max-width: 880px) { .hero-aside { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: var(--sp-3); } }

.rule-label { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--step--1); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: var(--sp-3); }
.rule-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Service index (numbered rows, not cards) ---------- */
.index-list { border-top: 1px solid var(--line); }
.index-row {
  display: grid; grid-template-columns: 4.5rem 1fr 22rem; gap: var(--sp-4);
  padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); align-items: start;
  text-decoration: none; color: inherit;
}
.index-row:hover { background: linear-gradient(90deg, var(--accent-wash), transparent 60%); }
.index-num { font-family: var(--display); font-size: var(--step-1); color: var(--accent); font-variant-numeric: tabular-nums; }
.index-title { font-family: var(--display); font-size: var(--step-2); line-height: 1.12; margin: 0 0 .35rem; }
.index-desc { color: var(--muted); margin: 0; max-width: 46ch; }
.index-tags { font-size: var(--step--1); color: var(--ink-soft); }
.index-tags span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: .18rem .6rem; margin: 0 .35rem .35rem 0; }
@media (max-width: 900px) {
  .index-row { grid-template-columns: 3rem 1fr; }
  .index-row .index-tags { grid-column: 2; }
}

/* ---------- Panels / cards ---------- */
.card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: var(--sp-4); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }

.stat { border-top: 2px solid var(--accent); padding-top: var(--sp-2); }
.stat b { display: block; font-family: var(--display); font-size: var(--step-2); font-weight: 600; line-height: 1; }
.stat span { font-size: var(--step--1); color: var(--muted); }

/* ---------- Method / steps ---------- */
.steps { counter-reset: step; display: grid; gap: 0; border-top: 1px solid var(--line); }
.step { display: grid; grid-template-columns: 4.5rem 1fr; gap: var(--sp-4); padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--display); color: var(--accent); font-size: var(--step-1); }
.step h4 { margin-bottom: .3rem; }
.step p { margin: 0; color: var(--muted); }
@media (max-width: 620px) { .step { grid-template-columns: 3rem 1fr; gap: var(--sp-2); } }

/* ---------- Pricing ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); align-items: stretch; }
@media (max-width: 940px) { .tiers { grid-template-columns: 1fr; } }
.tier { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-4); }
.tier--featured { border-color: var(--accent); box-shadow: var(--shadow); }
.tier-flag { font-size: var(--step--1); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--sp-2); }
.tier h3 { font-size: var(--step-2); }
.tier .price { font-family: var(--display); font-size: var(--step-3); line-height: 1; margin: var(--sp-2) 0 .25rem; }
.tier .price small { font-family: var(--sans); font-size: var(--step--1); color: var(--muted); font-weight: 500; }
.tier ul { margin: var(--sp-3) 0 var(--sp-4); padding-left: 1.1rem; color: var(--ink-soft); font-size: var(--step-0); flex: 1; }
.tier li { margin-bottom: .5rem; }
.tier .btn { margin-top: auto; }
.note { font-size: var(--step--1); color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #B9C4BE; padding-block: var(--sp-5) var(--sp-3); font-size: var(--step--1); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 880px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .wrap { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: var(--step--1); letter-spacing: .12em; text-transform: uppercase; margin-bottom: var(--sp-2); }
.site-footer a { color: #B9C4BE; text-decoration: none; display: block; padding: .18rem 0; }
.site-footer a:hover { color: #fff; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-name small { color: #8C9A93; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: var(--sp-4); padding-top: var(--sp-3); display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); justify-content: space-between; }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--sp-3); max-width: 40rem; }
.field { display: grid; gap: .35rem; }
.field label { font-size: var(--step--1); font-weight: 600; letter-spacing: .02em; }
.field input, .field select, .field textarea {
  font: inherit; font-size: var(--step-0); color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .8rem; width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--accent); }
.field--row { grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
@media (max-width: 560px) { .field--row { grid-template-columns: 1fr; } }
.form-status { font-size: var(--step--1); padding: .7rem .9rem; border-radius: var(--radius); display: none; }
.form-status.ok { display: block; background: var(--accent-wash); color: var(--accent-ink); }
.form-status.err { display: block; background: #FBE9E7; color: #8A2C1B; }

/* ---------- Legal / prose pages ---------- */
.prose { max-width: 74ch; }
.prose h2 { font-size: var(--step-2); margin-top: var(--sp-5); }
.prose h3 { font-size: var(--step-1); font-family: var(--sans); font-weight: 600; margin-top: var(--sp-4); }
.prose table { width: 100%; border-collapse: collapse; margin: var(--sp-3) 0; font-size: var(--step--1); }
.prose th, .prose td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; color: var(--ink); }

.fill { background: #FFF3C4; border-bottom: 1px dashed #C79A00; padding: 0 .25rem; font-weight: 600; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: var(--sp-3); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.measure { max-width: var(--measure); }
.divider { height: 1px; background: var(--line); border: 0; margin: var(--sp-5) 0; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: .5rem; top: .5rem; }
