/* ========================================================
   SEOFeast — Design Tokens
   ======================================================== */
:root {
  /* Color */
  --navy: #0B1B33;
  --navy-soft: #142B4D;
  --cream: #F7F6F2;
  --paper: #FFFFFF;
  --emerald: #16A34A;
  --emerald-dark: #0F7A38;
  --gold: #C9A24B;
  --ink: #1B2430;
  --ink-soft: #5B6472;
  --line: #E4E1D8;

  /* Type */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --max-w: 1180px;
  --pad: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

p { margin: 0; }

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

/* ============ Focus state (accessibility) ============ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ========================================================
   Header / Nav
   ======================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
  max-width: var(--max-w);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
}

.brand .dot { color: var(--emerald); }

.nav-links {
  display: flex;
  gap: 36px;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--navy);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--emerald);
}

.nav-cta {
  background: var(--navy);
  color: var(--cream) !important;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.nav-cta:hover { background: var(--emerald-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
}

@media (max-width: 760px) {
  .nav-links { 
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--cream);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links a { padding: 16px var(--pad); border-top: 1px solid var(--line); width: 100%; }
  .nav-cta { margin: 16px var(--pad); display: inline-block; }
  .nav-toggle { display: block; }
}

/* ========================================================
   Signature motif: the rank line
   A single ascending line that recurs as a graphic signature —
   represents climbing search rank. Used sparingly.
   ======================================================== */
.rankline { display: block; width: 100%; height: auto; }
.rankline path { fill: none; stroke: var(--emerald); stroke-width: 2.5; }
.rankline circle { fill: var(--emerald); }

/* ========================================================
   Hero
   ======================================================== */
.hero {
  position: relative;
  padding: clamp(64px, 10vw, 120px) var(--pad) clamp(48px, 8vw, 90px);
  overflow: hidden;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald-dark);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--emerald);
  border-radius: 50%;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  font-weight: 600;
  max-width: 14ch;
}

.hero h1 .accent { color: var(--emerald-dark); font-style: italic; }

.hero-sub {
  margin-top: 22px;
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 38ch;
}

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

.hero-art {
  position: relative;
}

.hero-art .rank-card {
  background: var(--navy);
  border-radius: 10px;
  padding: 32px;
  color: var(--cream);
  position: relative;
  box-shadow: 0 24px 60px -20px rgba(11,27,51,0.45);
}

.rank-card-label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(247,246,242,0.6);
  margin-bottom: 6px;
}

.rank-card-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 600;
}

.rank-card-num .small { font-size: 1.2rem; color: var(--gold); margin-left: 6px; }

/* ========================================================
   Buttons
   ======================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--emerald);
  color: var(--paper);
}
.btn-primary:hover { background: var(--emerald-dark); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: var(--cream); }

.btn-light {
  background: var(--cream);
  color: var(--navy);
}
.btn-light:hover { background: var(--paper); }

/* ========================================================
   Sections (generic)
   ======================================================== */
.section {
  padding: clamp(56px, 8vw, 100px) var(--pad);
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-head {
  max-width: 56ch;
  margin-bottom: 48px;
}

.section-head .eyebrow { margin-bottom: 14px; }

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
}

.section-head p {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.section-alt { background: var(--navy); color: var(--cream); }
.section-alt h2, .section-alt h3 { color: var(--cream); }
.section-alt .section-head p { color: rgba(247,246,242,0.72); }

/* ========================================================
   Logo strip
   ======================================================== */
.logo-strip {
  display: flex;
  gap: 48px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 28px var(--pad);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.logo-strip span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink-soft);
  opacity: 0.55;
  letter-spacing: 0.02em;
}

/* ========================================================
   Cards: Services
   ======================================================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

@media (max-width: 880px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--emerald); transform: translateY(-3px); }

.card .index {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  display: block;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.card p { color: var(--ink-soft); font-size: 0.97rem; }

.card ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card ul li {
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding-left: 20px;
  position: relative;
}
.card ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 8px; height: 1.5px;
  background: var(--emerald);
}

/* ========================================================
   Stats
   ======================================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--gold);
}
.stat-label {
  font-size: 0.88rem;
  color: rgba(247,246,242,0.7);
  margin-top: 6px;
}
.section-alt .stat-label { color: rgba(247,246,242,0.7); }

/* ========================================================
   Process steps (real sequence -> numbering justified)
   ======================================================== */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
@media (max-width: 880px) { .process { grid-template-columns: 1fr; gap: 32px; } }

.process-step {
  position: relative;
  padding: 0 20px 0 0;
}
.process-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 14px;
  right: -14px;
  width: 24px;
  height: 1px;
  background: var(--line);
}
@media (max-width: 880px) {
  .process-step:not(:last-child)::after { display: none; }
}

.process-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--emerald-dark);
  font-weight: 700;
  margin-bottom: 14px;
}

.process-step h4 { font-size: 1.05rem; margin-bottom: 8px; }
.process-step p { color: var(--ink-soft); font-size: 0.92rem; }

/* ========================================================
   Portfolio
   ======================================================== */
.portfolio-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--line);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover { border-color: var(--emerald); color: var(--navy); }
.filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream);
}

.case-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.case-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(11,27,51,0.25); }

.case-thumb {
  height: 160px;
  background: var(--navy-soft);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
.case-thumb .tag {
  background: rgba(247,246,242,0.12);
  color: var(--cream);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.case-body { padding: 26px; }
.case-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.case-body p { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 16px; }

.case-metrics {
  display: flex;
  gap: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.case-metric .num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--emerald-dark);
}
.case-metric .lbl {
  font-size: 0.74rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ========================================================
   Testimonial
   ======================================================== */
.testimonial {
  background: var(--paper);
  border-left: 3px solid var(--gold);
  padding: 32px 36px;
  border-radius: 4px;
}
.testimonial p.quote {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--navy);
  margin-bottom: 18px;
}
.testimonial .who { font-size: 0.88rem; color: var(--ink-soft); font-weight: 600; }
.testimonial .who span { color: var(--ink-soft); font-weight: 400; }

/* ========================================================
   CTA band
   ======================================================== */
.cta-band {
  background: var(--navy);
  border-radius: 12px;
  padding: clamp(40px, 6vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  color: var(--cream);
}
.cta-band h2 { color: var(--cream); font-size: clamp(1.5rem, 2.6vw, 2rem); max-width: 28ch; }
.cta-band p { color: rgba(247,246,242,0.72); margin-top: 10px; }

/* ========================================================
   Forms
   ======================================================== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.2s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--emerald);
  outline: none;
}
.field textarea { resize: vertical; min-height: 120px; }

.contact-info-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(247,246,242,0.14);
}
.contact-info-item .ic {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(22,163,74,0.18);
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  flex-shrink: 0;
}
.contact-info-item h4 { color: var(--cream); font-size: 0.98rem; margin-bottom: 4px; }
.contact-info-item p { color: rgba(247,246,242,0.68); font-size: 0.9rem; }

/* ========================================================
   FAQ
   ======================================================== */
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 22px 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q .plus {
  color: var(--emerald);
  font-size: 1.3rem;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-a p { padding-bottom: 22px; color: var(--ink-soft); max-width: 60ch; }

/* ========================================================
   Footer
   ======================================================== */
.site-footer {
  background: var(--navy);
  color: rgba(247,246,242,0.7);
  padding: 56px var(--pad) 28px;
}
.footer-top {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(247,246,242,0.12);
}
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr 1fr; } }

.footer-brand .brand { color: var(--cream); margin-bottom: 14px; }
.footer-brand p { font-size: 0.9rem; max-width: 32ch; }

.footer-col h5 {
  color: var(--cream);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-weight: 600;
}
.footer-col a {
  display: block;
  font-size: 0.92rem;
  padding: 6px 0;
  color: rgba(247,246,242,0.7);
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--emerald); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.82rem;
}

/* ========================================================
   Page header (non-home pages)
   ======================================================== */
.page-hero {
  padding: clamp(48px, 7vw, 80px) var(--pad) clamp(40px, 6vw, 60px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.page-hero .container { max-width: var(--max-w); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page-hero p { margin-top: 16px; color: var(--ink-soft); font-size: 1.05rem; max-width: 50ch; }
.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.breadcrumb .sep { margin: 0 8px; color: var(--line); }
.breadcrumb .current { color: var(--emerald-dark); font-weight: 600; }
