/* Avyi Co. | Content, design and copywriting
   Brand: Ink #12263A, Dawn #E8B4A6, Dawn deep #C9806F, Ground #F4F6F8
   Fonts: Playfair Display (headings), Source Sans 3 (body), self-hosted */

@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay-var.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-var.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #12263A;
  --ink-soft: #2E3D4D;
  --muted: #4A5868;
  --dawn: #E8B4A6;
  --dawn-deep: #C9806F;
  --ground: #F4F6F8;
  --paper: #FFFFFF;
  --line: #D5DCE3;
  --line-ink: rgba(244, 246, 248, 0.18);

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(72px, 10vw, 128px);
  --radius: 14px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(44px, 7.4vw, 92px); }
h2 { font-size: clamp(32px, 4.4vw, 52px); }
h3 { font-size: 24px; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--ground); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 16px; color: var(--ground); }

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

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 26px;
  border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--ground);
  font-family: var(--sans); font-size: 17px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: #0B1826; color: var(--ground); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--ground); }
.btn-small { min-height: 44px; padding: 8px 20px; font-size: 16px; }
.btn-light { background: var(--ground); color: var(--ink); border-color: var(--ground); }
.btn-light:hover { background: var(--paper); color: var(--ink); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 246, 248, 0.94);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 24px; }
.brand img { width: 112px; }

.site-nav ul { list-style: none; display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; }
.site-nav a:not(.btn) { text-decoration: none; font-weight: 600; font-size: 16px; color: var(--ink-soft); }
.site-nav a:not(.btn):hover { color: var(--ink); text-decoration: underline; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent;
  cursor: pointer; padding: 0; position: relative;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute; left: 10px; width: 24px; height: 2px; background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1000px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--ground); border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; }
  .site-nav li a:not(.btn) { display: block; padding: 12px 0; font-size: 18px; }
  .site-nav li .btn { margin-top: 12px; width: 100%; }
}

/* Hero */
.hero { position: relative; padding: clamp(64px, 10vw, 136px) 0 clamp(120px, 14vw, 180px); overflow: hidden; }
.hero-inner { position: relative; z-index: 1; }
.hero h1 { max-width: 12ch; }
.lede { font-size: clamp(19px, 2vw, 22px); color: var(--ink-soft); max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.horizon {
  position: absolute; left: 0; right: 0; bottom: clamp(48px, 7vw, 80px);
  height: 2px; background: var(--ink);
}
.sun {
  position: absolute; bottom: 10px; right: clamp(24px, 12vw, 180px);
  width: clamp(140px, 22vw, 300px); aspect-ratio: 2 / 1;
  background: var(--dawn); border-radius: 999px 999px 0 0;
  animation: rise 1.6s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes rise { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sun { animation: none; } }
@media (max-width: 640px) {
  .hero { padding-bottom: 168px; }
  .sun { width: 128px; right: 24px; }
}

/* Sections */
.section { padding: var(--section) 0; }
.section-paper { background: var(--paper); }
.section-ink { background: var(--ink); color: var(--ground); }
.section-ink .eyebrow { color: var(--dawn); }
.section-ink a { color: var(--ground); }
.section-ink a:hover { color: var(--dawn); }

.section-head { max-width: 640px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head p:last-child { color: var(--ink-soft); font-size: 19px; }
.section-ink .section-head p:last-child { color: rgba(244, 246, 248, 0.82); }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 7vw, 96px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }

.small-head { font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

/* Lists */
.tick-list { list-style: none; padding: 0; margin: 0 0 1.4em; }
.tick-list li { position: relative; padding-left: 26px; margin-bottom: 6px; }
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: 0.72em;
  width: 12px; height: 6px; border-radius: 6px 6px 0 0; background: var(--dawn-deep);
}
.tick-list-large li { font-size: 19px; margin-bottom: 10px; }

/* Services */
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1080px) { .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .service-grid { grid-template-columns: minmax(0, 1fr); } }

.service {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; display: flex; flex-direction: column;
}
.service-num { font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--dawn-deep); margin-bottom: 20px; }
.service p { color: var(--ink-soft); }
.service .tick-list { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }

/* Process */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; position: relative; }
.steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 1px; background: var(--line-ink);
}
.step { position: relative; padding-top: 44px; }
.step p { color: rgba(244, 246, 248, 0.82); margin: 0; }
.step h3 { color: var(--ground); }
.step-marker {
  position: absolute; top: 4px; left: 0; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--dawn);
}
.step-marker-sun { width: 32px; height: 16px; top: 4px; border: 0; border-radius: 16px 16px 0 0; background: var(--dawn); }
@media (max-width: 900px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps::before { left: 7px; right: auto; top: 8px; bottom: 8px; width: 1px; height: auto; }
  .step { padding: 0 0 36px 48px; }
  .step:last-child { padding-bottom: 0; }
  .step-marker-sun { left: -8px; }
}

/* Packages */
.package-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 980px) { .package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .package-grid { grid-template-columns: minmax(0, 1fr); } }
.package { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--ground); }
.package p:last-child { margin-bottom: 0; color: var(--ink-soft); }
.package-best { font-size: 15px; font-weight: 600; color: var(--muted); }
.package-featured { background: var(--ink); color: var(--ground); border-color: var(--ink); grid-row: span 2; display: flex; flex-direction: column; justify-content: flex-end; min-height: 260px; position: relative; overflow: hidden; }
.package-featured::before {
  content: ""; position: absolute; top: 32px; right: 28px; width: 72px; height: 36px;
  border-radius: 36px 36px 0 0; background: var(--dawn);
}
.package-featured h3 { font-size: 32px; }
.package-featured .package-best { color: var(--dawn); }
.package-featured p:last-child { color: rgba(244, 246, 248, 0.86); }
@media (max-width: 600px) { .package-featured { grid-row: auto; } }
.note { margin-top: 28px; color: var(--muted); font-size: 16px; }
.center { text-align: center; margin-top: 24px; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(40px, 8vw, 112px); align-items: center; }
.about-mark { width: 100%; max-width: 360px; }
.about h2 em { font-style: italic; color: var(--dawn-deep); }
.about p { color: var(--ink-soft); max-width: 56ch; }
@media (max-width: 760px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .about-mark { max-width: 180px; }
}

/* Contact */
.contact-direct { color: rgba(244, 246, 248, 0.86); }
.form { background: rgba(244, 246, 248, 0.06); border: 1px solid var(--line-ink); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: 16px; margin-bottom: 8px; }
.optional { font-weight: 400; color: rgba(244, 246, 248, 0.7); }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 17px; color: var(--ink);
  background: var(--ground); border: 1px solid transparent; border-radius: 10px;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--dawn); outline-offset: 2px; }
.field [aria-invalid="true"] { border-color: var(--dawn); box-shadow: 0 0 0 2px var(--dawn); }
.field-check { display: flex; gap: 12px; align-items: flex-start; }
.field-check input { width: 22px; height: 22px; margin: 3px 0 0; flex: none; accent-color: var(--dawn-deep); }
.field-check label { font-weight: 400; font-size: 15px; line-height: 1.5; margin: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 14px 16px; border-radius: 10px; margin-bottom: 20px; font-weight: 600; }
.form-status.is-success { background: var(--dawn); color: var(--ink); }
.form-status.is-error { background: var(--ground); color: var(--ink); border-left: 0; box-shadow: inset 0 0 0 2px var(--dawn-deep); }

/* Footer */
.site-footer { background: #0B1826; color: rgba(244, 246, 248, 0.82); padding: 48px 0; font-size: 15px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.footer-logo { width: 104px; }
.footer-text p { margin: 0 0 4px; }
.site-footer a { color: var(--ground); }

/* Simple content pages (privacy, 404) */
.page { padding: clamp(56px, 8vw, 96px) 0 var(--section); }
.page .wrap { max-width: 780px; }
.page h1 { font-size: clamp(38px, 6vw, 60px); }
.page h2 { font-size: 26px; margin-top: 1.6em; }
.page p, .page li { color: var(--ink-soft); }

/* ---------- Multi-page additions ---------- */

/* Current page in the menu */
.site-nav a[aria-current="page"]:not(.btn) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--dawn-deep); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* Inner page hero */
.page-hero { position: relative; padding: clamp(56px, 8vw, 104px) 0 clamp(104px, 11vw, 140px); overflow: hidden; }
.page-hero h1 { font-size: clamp(40px, 6vw, 72px); max-width: 16ch; }
.page-hero .lede { max-width: 46ch; }
.page-hero .horizon { bottom: clamp(40px, 5vw, 56px); }
.page-hero .sun { width: clamp(110px, 14vw, 190px); }
@media (max-width: 640px) {
  .page-hero { padding-bottom: 148px; }
  .page-hero .sun { width: 110px; }
}

/* Two service arms on the home page */
.arm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 860px) { .arm-grid { grid-template-columns: minmax(0, 1fr); } }
.arm {
  border-radius: 20px; padding: clamp(28px, 4vw, 48px);
  display: flex; flex-direction: column; gap: 4px;
  background: var(--paper); border: 1px solid var(--line);
}
.arm-ink { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.arm .eyebrow { margin-bottom: 8px; }
.arm-ink .eyebrow { color: var(--dawn); }
.arm h3 { font-size: clamp(28px, 3vw, 36px); }
.arm p { color: var(--ink-soft); }
.arm-ink p { color: rgba(244, 246, 248, 0.84); }
.arm .tick-list { margin-bottom: 28px; }
.arm-ink .tick-list li::before { background: var(--dawn); }
.arm .btn { margin-top: auto; align-self: flex-start; }

/* Six-up service grid (strategy page) */
.service-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 980px) { .service-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .service-grid-3 { grid-template-columns: minmax(0, 1fr); } }
.service-grid-3 .service p:last-child { margin-bottom: 0; }

/* Sector list */
.sector-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px; list-style: none; padding: 0; margin: 0; }
.sector { border-top: 2px solid var(--ink); padding-top: 14px; }
.sector strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.2; margin-bottom: 6px; }
.sector span { color: var(--ink-soft); font-size: 16px; }

/* Engagement options */
.engage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .engage-grid { grid-template-columns: minmax(0, 1fr); } }
.engage { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--ground); }
.engage h3 { margin-bottom: 6px; }
.engage p:last-child { margin-bottom: 0; color: var(--ink-soft); }

/* Fit-together band */
.fit { padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: fit; }
@media (max-width: 860px) { .fit { grid-template-columns: minmax(0, 1fr); } }
.fit li { list-style: none; }
.fit h3 { color: var(--ground); font-size: 22px; }
.fit p { color: rgba(244, 246, 248, 0.84); margin: 0; }

/* Background list (about page) */
.bg-list { list-style: none; padding: 0; margin: 0 0 32px; }
.bg-list li { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 8px 32px; padding: 20px 0; border-top: 1px solid var(--line); }
.bg-list li:last-child { border-bottom: 1px solid var(--line); }
.bg-role { font-family: var(--serif); font-size: 21px; line-height: 1.25; }
.bg-list p { margin: 0; color: var(--ink-soft); }
@media (max-width: 700px) { .bg-list li { grid-template-columns: minmax(0, 1fr); } }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 700px) { .facts { grid-template-columns: minmax(0, 1fr); } }
.fact { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; }
.fact p { margin: 0; color: var(--ink-soft); }

/* Call-to-action band */
.cta-band { background: var(--ink); color: var(--ground); padding: clamp(56px, 8vw, 96px) 0; position: relative; overflow: hidden; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; position: relative; z-index: 1; }
.cta-band h2 { margin: 0; max-width: 18ch; }
.cta-band::after {
  content: ""; position: absolute; right: 8%; bottom: 0; width: 160px; height: 80px;
  border-radius: 120px 120px 0 0; background: var(--dawn);
}

.text-link { font-weight: 600; text-decoration: underline; text-decoration-color: var(--dawn-deep); text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* Contact page heading */
#contact h1 { font-size: clamp(36px, 5vw, 56px); }

/* ---------- Mobile refinements ---------- */
@media (max-width: 700px) {
  /* Keep the call-to-action sun clear of the button */
  .cta-band { padding-bottom: 112px; }
  .cta-band::after { width: 112px; height: 56px; right: 20px; }

  /* Larger, well-spaced footer links for thumbs */
  .footer-text p:first-child { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 12px; }
  .footer-text p:first-child a { display: inline-block; padding: 10px 0; font-size: 16px; }
  .footer-text .sep { display: none; }

  /* Comfortable consent checkbox */
  .field-check input { width: 26px; height: 26px; }
}
