/* =========================================================================
   aihito.ai — marketing site
   Design tokens and rules come from BRAND.md. Border radius is 0 everywhere
   and there are no box shadows; both are deliberate. Shu Red is an accent
   only (numerals, one rule, hover states) — never a surface.
   ========================================================================= */

/* ---------- tokens ---------- */
:root {
  /* palette */
  --ink:        #14161A;  /* Sumi Ink   */
  --indigo:     #22406E;  /* Ai Indigo  */
  --shu:        #B8492F;  /* Shu Red    */
  --ivory:      #F4F1E9;  /* Washi Ivory*/
  --stone:      #D8D3C6;  /* Stone      */
  --muted:      #8B8578;  /* eyebrows, captions, footer */
  --body:       #4A4842;  /* paragraph text on ivory */

  --scrim:      rgba(244, 241, 233, 0.94); /* sticky header over ivory */
  --on-indigo:  rgba(244, 241, 233, 0.82); /* paragraph text on indigo */
  --on-ink:     rgba(244, 241, 233, 0.80); /* paragraph text on ink */

  /* type */
  --font-display: 'Zen Old Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', Georgia, serif;
  --font-text:    'Jost', 'Century Gothic', 'Avenir Next', system-ui, sans-serif;

  /* Desktop sizes are the design's exact values and sit at the top of each
     clamp, so anything >=1180px renders the spec verbatim. */
  --fs-h1:        clamp(40px, 1.2rem + 4.2vw, 66px);
  --fs-h2-svc:    clamp(30px, 1.1rem + 2.3vw, 42px);
  --fs-h2-about:  clamp(30px, 1.2rem + 2.0vw, 40px);
  --fs-h2-cta:    clamp(30px, 1.0rem + 2.6vw, 46px);
  --fs-lede:      clamp(17px, 1rem + 0.30vw, 19px);
  --fs-lead:      clamp(22px, 1rem + 0.90vw, 26px);
  --fs-card-h3:   clamp(23px, 1rem + 0.90vw, 26px);

  /* layout */
  --measure: 1180px;
  --pad: 40px;

  --t: 150ms ease;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-text);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p { text-wrap: pretty; }
svg { display: block; }
img { max-width: 100%; height: auto; }

a {
  color: var(--indigo);
  text-decoration: none;
  transition: background-color var(--t), color var(--t), border-color var(--t);
}
a:hover { color: var(--shu); }

/* A visible focus ring was not in the design; it is required for keyboard use.
   Shu Red at 2px reads clearly on both the ivory and the indigo/ink grounds. */
:focus-visible {
  outline: 2px solid var(--shu);
  outline-offset: 2px;
}

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

/* ---------- shared ---------- */
.wrap {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* Full-bleed colour bands keep their inner content on the same 1180px measure. */
.band-indigo { background: var(--indigo); color: var(--ivory); }
.band-ink    { background: var(--ink);    color: var(--ivory); }

.mark { fill: currentColor; flex: none; }

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--indigo);
  color: var(--ivory);
  padding: 12px 20px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.skip-link:focus {
  left: 0;
  color: var(--ivory);
}

/* Anchored sections must clear the sticky header. */
[id] { scroll-margin-top: 96px; }

/* ---------- buttons ---------- */
/* Every button carries a 1px transparent border so the outlined secondary
   button matches the filled ones in height when they sit side by side. */
.btn {
  display: inline-block;
  border: 1px solid transparent;
  padding: 16px 34px;
  font-size: 13px;
  font-family: inherit;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.btn-primary { background: var(--indigo); color: var(--ivory); }
.btn-primary:hover { background: var(--ink); color: var(--ivory); }

.btn-secondary { background: transparent; border-color: var(--indigo); color: var(--indigo); }
.btn-secondary:hover { background: var(--indigo); color: var(--ivory); }

.btn-nav {
  background: var(--indigo);
  color: var(--ivory);
  padding: 11px 22px;
  font-size: 12px;
  letter-spacing: 0.1em;
}
.btn-nav:hover { background: var(--shu); color: var(--ivory); }

.btn-contact { background: var(--indigo); color: var(--ivory); padding: 17px 40px; }
.btn-contact:hover { background: var(--shu); color: var(--ivory); }

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--stone);
}

.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--indigo);
}
.brand:hover { color: var(--indigo); }        /* the mark never turns shu red */
.brand-mark { width: 34px; height: 34px; }

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.wordmark-tld { color: var(--indigo); }

/* ---------- nav ----------
   <details> gives an accessible disclosure menu that works with no JS at all.
   Below 768px it behaves natively; at 768px and up the panel is forced open
   and the summary hidden, so the same markup serves both. */
.nav { position: relative; }

.nav-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--body);
  padding: 10px 0;
}
.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle:hover { color: var(--indigo); }

.nav-toggle-bars { display: grid; gap: 4px; width: 20px; }
.nav-toggle-bars i {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--t), opacity var(--t);
}
.nav[open] .nav-toggle-bars i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav[open] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav[open] .nav-toggle-bars i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* No `display` here on purpose: while the menu is closed the panel must stay
   hidden by the browser's own <details> behaviour. Declaring display in the
   base rule would override that and pin the menu permanently open. */
.nav-panel {
  flex-direction: column;
  align-items: stretch;
  position: absolute;
  right: 0;
  top: calc(100% + 18px);
  min-width: 232px;
  background: var(--ivory);
  border: 1px solid var(--stone);
  padding: 8px;
}
.nav[open] > .nav-panel { display: flex; }

.nav-link {
  font-size: 14.5px;
  letter-spacing: 0.04em;
  color: var(--body);
  padding: 12px 14px;
}
.nav-link:hover { color: var(--indigo); }

.nav-panel .btn-nav { margin: 8px 6px 6px; text-align: center; }

@media (min-width: 768px) {
  .nav-toggle { display: none; }

  /* Chromium 131+ hides closed <details> content with content-visibility on
     ::details-content, which overriding `display` on the child cannot undo —
     so undo both. */
  .nav::details-content { content-visibility: visible; block-size: auto; }

  /* Forced open on desktop regardless of the <details> state, so the same
     markup serves both breakpoints. */
  .nav-panel {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 34px;
    min-width: 0;
    background: none;
    border: 0;
    padding: 0;
  }
  .nav-link { padding: 0; }
  .nav-panel .btn-nav { margin: 0; }
}

/* =========================================================================
   1 · Hero
   ========================================================================= */
.hero {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 72px;
  align-items: center;
  padding-block: 112px 96px;
}

.hero-eyebrow { padding-bottom: 26px; }

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h1);
  line-height: 1.12;
  letter-spacing: -0.005em;
}

.hero-lede {
  margin: 30px 0 0;
  max-width: 620px;
  font-size: var(--fs-lede);
  line-height: 1.7;
  color: var(--body);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding-top: 40px;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.mark-hero { width: 232px; height: 232px; color: var(--indigo); }

.hero-caption {
  margin: 0;
  max-width: 260px;
  text-align: center;
  font-size: 14px;
  line-height: 1.85;
  color: var(--body);
}
.kanji {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  color: var(--indigo);
}
.romaji {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =========================================================================
   2 · Problem band
   ========================================================================= */
.problem {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
  padding-block: 68px;
}

.problem-lead {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-lead);
  line-height: 1.4;
}

.problem-body {
  grid-column: span 2;
  margin: 0;
  font-size: 17px;
  line-height: 1.75;
  color: var(--on-indigo);
}

/* =========================================================================
   3 · Services
   ========================================================================= */
.services { padding-block: 96px 40px; }

.services-title {
  margin: 22px 0 56px;
  max-width: 700px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h2-svc);
  line-height: 1.2;
}

/* The 1px gap over a Stone-coloured grid background is what draws the
   hairline rules between cards — there are no card borders. */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--stone);
  border: 1px solid var(--stone);
}

.card {
  background: var(--ivory);
  padding: 40px 40px 44px;
}

.card h3 {
  margin: 16px 0 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-card-h3);
  line-height: 1.3;
}

.card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
}

/* The numeral is also a <p>, so it has to outrank the rule above. Shu Red
   here is one of its few sanctioned uses. */
.card p.card-num {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--shu);
}

/* =========================================================================
   4 · How we work
   ========================================================================= */
.how { padding-block: 80px 96px; }

/* The section's only heading is the eyebrow itself. */
.eyebrow-heading { font-family: var(--font-text); }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-top: 48px;
  margin: 0;
  list-style: none;
}

.step {
  border-top: 3px solid var(--indigo);
  padding-top: 24px;
}

/* Switching this one rule to Shu Red flags the ongoing phase. The engagement
   does not end here — it continues on retainer. Do not reword toward handoff. */
.step-ongoing { border-top-color: var(--shu); }

.step h3 {
  margin: 0;
  padding-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.3;
}

.step p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--body);
}

/* =========================================================================
   5 · About
   ========================================================================= */
.about {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
  padding-block: 96px;
}

.about h2 {
  margin: 22px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h2-about);
  line-height: 1.2;
}

.about-copy {
  display: flex;
  flex-direction: column;
  gap: 26px;
  font-size: 17.5px;
  line-height: 1.75;
  color: var(--on-ink);
}
.about-copy p { margin: 0; }

/* "ai" and "hito" — and nothing else — come up to full opacity. */
.hl { font-weight: inherit; color: var(--ivory); }

/* =========================================================================
   6 · Contact
   ========================================================================= */
.contact {
  padding-block: 104px 96px;
  text-align: center;
}

.mark-contact {
  width: 60px;
  height: 60px;
  color: var(--indigo);
  margin-inline: auto;
}

.contact h2 {
  margin: 32px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h2-cta);
  line-height: 1.2;
}

.contact-lede {
  margin: 24px auto 0;
  max-width: 560px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--body);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  padding-top: 38px;
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { border-top: 1px solid var(--stone); }

.footer-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 34px;
  font-size: 13.5px;
  color: var(--muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.footer-mark { width: 22px; height: 22px; color: var(--muted); }
.footer-copy { margin: 0; }

/* =========================================================================
   Responsive
   Breakpoint behaviour was not part of the desktop-only design. This follows
   the handoff's recommended starting point and is pending a design review.
   ========================================================================= */
@media (max-width: 1023px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-block: 72px 72px;
  }
  .hero-aside { order: -1; }            /* mark sits above the text */
  .mark-hero { width: 168px; height: 168px; }

  .problem { grid-template-columns: 1fr; gap: 24px; }
  .problem-body { grid-column: auto; }

  .card-grid { grid-template-columns: 1fr; }

  .steps { grid-template-columns: 1fr 1fr; gap: 36px; }

  .about { grid-template-columns: 1fr; gap: 40px; padding-block: 72px; }

  .services { padding-block: 72px 40px; }
  .how { padding-block: 64px 72px; }
  .contact { padding-block: 80px 72px; }
}

@media (max-width: 767px) {
  :root { --pad: 24px; }

  .header-in { padding-block: 14px; }

  .hero { padding-block: 56px 56px; }
  .mark-hero { width: 132px; height: 132px; }
  .hero-actions .btn { flex: 1 1 auto; text-align: center; }

  .problem { padding-block: 52px; }

  .services-title { margin-bottom: 40px; }
  .card { padding: 32px 26px 36px; }

  .steps { grid-template-columns: 1fr; gap: 32px; padding-top: 36px; }

  .footer-in {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}
