/* ============================================================
   Makai Technologies, Inc. — corporate site
   Aligned to the live Makai product brand (themakaiapp.com):
   Raleway, navy + teal maritime. See docs/brand/brand-guidelines.md.

   This is the COMPANY brand. Cibola the game keeps its own
   Noon Tide identity — a 60x60 App Store tile is a different problem.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@500;600;700;800&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap');

:root {
  /* Brand — lifted verbatim from makai-web/tailwind.config.ts */
  --navy:       #1D3461;
  --navy-dark:  #0E1D37;
  --navy-deep:  #080F1E;
  --teal:       #00B5B8;
  --teal-light: #40CBCE;
  --teal-pale:  #B8ECEE;
  --sky:        #79B3E0;
  --coral:      #F89F65;
  --slate:      #2D3243;
  --gray-brand: #7A8FA3;

  /* Derived, because several brand colors fail AA as text.
     teal #00B5B8 on white is 2.53:1 — fill only, never text.
     gray-brand #7A8FA3 on white is 3.34:1 — hairlines only. */
  --teal-deep:  #00797B;   /* 5.25:1 on paper — links, interactive text */
  --muted:      #5A6B80;   /* 5.47:1 on paper — secondary text */

  --paper:      #FFFFFF;
  --paper-tint: #F4F8FB;
  --rule:       #DDE5EC;

  --font-brand: 'Raleway', system-ui, sans-serif;
  --font-body:  'Source Serif 4', Georgia, serif;

  --measure: 68ch;
  --shell: 1140px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* The masthead is sticky, so a jump target would otherwise land behind it. */
h2[id], h3[id], main { scroll-margin-top: 5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy-deep);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
::selection { background: var(--teal-pale); color: var(--navy-deep); }
:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 3px; border-radius: 3px; }

.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10000;
  background: var(--navy); color: #fff; padding: .7rem 1.1rem;
  font-family: var(--font-brand); font-weight: 700; font-size: .85rem;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------------- Type ----------------
   Raleway never below 500, and never sets a paragraph. */

h1, h2, h3 {
  font-family: var(--font-brand);
  font-feature-settings: 'ss01' 0;
  color: var(--navy-deep);
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -.024em; line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 700; letter-spacing: -.016em; line-height: 1.16; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.006em; }

.display {
  font-size: clamp(2.5rem, 6.4vw, 4.4rem);
  font-weight: 800; letter-spacing: -.032em; line-height: 1.04;
}
.display em { font-style: normal; color: var(--teal-deep); }

.annot {
  font-family: var(--font-brand); font-size: .74rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}

.lede { font-size: clamp(1.06rem, 1.6vw, 1.2rem); line-height: 1.6; max-width: 58ch; color: var(--slate); }

/* ---------------- Header ---------------- */

.masthead { background: var(--paper); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 100; }
.masthead__in { display: flex; align-items: center; gap: 2rem; padding: .9rem 0; min-height: 62px; }

.wordmark {
  font-family: var(--font-brand); font-weight: 800; font-size: 1.06rem;
  letter-spacing: .015em; text-transform: uppercase; color: var(--navy-deep);
  text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: .6rem;
}
.wordmark svg { width: 27px; height: 27px; flex: none; }
.wordmark span { font-family: var(--font-brand); font-weight: 600; font-size: .6rem; letter-spacing: .1em; color: var(--muted); }

.nav { margin-left: auto; display: flex; gap: 1.55rem; align-items: center; }
.nav a {
  font-family: var(--font-brand); font-size: .93rem; font-weight: 600;
  color: var(--slate); text-decoration: none; padding: .3rem 0;
  border-bottom: 2.5px solid transparent; transition: color .2s var(--ease), border-color .2s var(--ease);
}
.nav a:hover, .nav a[aria-current='page'] { color: var(--navy-deep); border-bottom-color: var(--teal); }

@media (max-width: 760px) {
  .nav { gap: .95rem; }
  .nav a { font-size: .82rem; }
  .wordmark span { display: none; }
}

/* ---------------- Hero ---------------- */

.hero { padding: clamp(3rem, 8vh, 5.5rem) 0 clamp(2.5rem, 6vh, 4rem); }
.hero .annot { display: block; margin-bottom: 1.1rem; }
.hero .lede { margin: 1.6rem 0 0; }

.rise { opacity: 0; transform: translateY(14px); animation: rise .7s var(--ease) forwards; }
.rise:nth-child(1) { animation-delay: .04s; }
.rise:nth-child(2) { animation-delay: .13s; }
.rise:nth-child(3) { animation-delay: .22s; }
.rise:nth-child(4) { animation-delay: .31s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Wake — the recurring motif, echoing the app icon's V */
.wake { display: block; width: 148px; height: 34px; margin-top: 2.6rem; }

/* ---------------- Bands ---------------- */

.band { padding: clamp(3rem, 7vh, 4.75rem) 0; border-top: 1px solid var(--rule); }
.band--tint { background: var(--paper-tint); }
.band--navy { background: var(--navy-dark); border-top: 0; }
.band--navy h2, .band--navy h3 { color: #fff; }
.band--navy p { color: #C9D6E4; }
.band--navy .annot { color: var(--teal-light); }

.head { margin-bottom: 2.3rem; }
.head .annot { display: block; margin-bottom: .7rem; }

/* ---------------- Feature (flagship) ---------------- */

.feature {
  display: grid; gap: clamp(1.6rem, 3vw, 2.8rem);
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
}
@media (max-width: 820px) { .feature { grid-template-columns: 1fr; } }
.feature .annot { display: block; margin-bottom: .7rem; }
.feature h2 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); font-weight: 800; letter-spacing: -.024em; margin-bottom: .85rem; }
.feature p { margin: 0 0 1rem; color: var(--slate); }
.feature p:last-of-type { margin-bottom: 0; }

.plate {
  border: 1px solid var(--rule); border-radius: 14px; overflow: hidden;
  background: var(--paper-tint);
}
.plate img, .plate svg { width: 100%; height: auto; }

/* Capability chips */
.pledge { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.3rem 0 0; }
.pledge li {
  font-family: var(--font-brand); font-weight: 600; font-size: .76rem;
  border: 1px solid var(--rule); background: var(--paper-tint);
  padding: .34rem .68rem; border-radius: 999px; color: var(--slate); margin: 0;
}
.band--navy .pledge li { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: #D8E4EF; }

/* Coming-soon line */
.soon-note {
  border-top: 1px solid var(--rule); margin-top: 2.4rem; padding-top: 1.3rem;
  display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: baseline;
}
.soon-note p { margin: 0; font-size: .95rem; color: var(--muted); max-width: 62ch; }

.pill {
  font-family: var(--font-brand); font-weight: 700; font-size: .66rem;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem .6rem; border-radius: 999px; white-space: nowrap;
}
.pill--live    { background: var(--teal); color: #04262A; }
.pill--soon    { background: var(--coral); color: #4A2408; }
.pill--soon-outline { background: transparent; border: 1px solid var(--rule); color: var(--muted); }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-brand); font-size: .97rem; font-weight: 700;
  text-decoration: none; padding: .74rem 1.4rem; border-radius: 9px;
  border: 1.5px solid var(--navy); color: var(--navy); background: transparent;
  cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease);
}
.btn:hover { background: var(--navy); color: #fff; }
.btn--solid { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--solid:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }
.btn--teal { background: var(--teal); border-color: var(--teal); color: #04262A; }
.btn--teal:hover { background: var(--teal-light); border-color: var(--teal-light); color: #04262A; }
.band--navy .btn { border-color: rgba(255,255,255,.6); color: #fff; }
.band--navy .btn:hover { background: #fff; color: var(--navy-deep); }
.btnrow { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* ---------------- Prose ---------------- */

.doc { padding: clamp(2.5rem, 6vh, 4rem) 0 5rem; }
.doc__head { border-bottom: 1px solid var(--rule); padding-bottom: 1.7rem; margin-bottom: 2.4rem; }
.doc__head .annot { display: block; margin-bottom: .8rem; }

.prose { max-width: var(--measure); }
.prose h2 { margin: 2.6rem 0 .8rem; }
.prose h3 { margin: 1.7rem 0 .45rem; color: var(--teal-deep); }
.prose p { margin: 0 0 1.05rem; color: var(--slate); }
.prose ul { padding-left: 1.15rem; margin: 0 0 1.15rem; }
.prose li { margin-bottom: .5rem; color: var(--slate); }
.prose li::marker { color: var(--teal); }
.prose strong { color: var(--navy-deep); font-weight: 600; }

.callout {
  border: 1px solid var(--rule); border-left: 4px solid var(--teal);
  border-radius: 0 9px 9px 0; background: var(--paper-tint);
  padding: 1.15rem 1.35rem; margin: 1.7rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--navy); }

.toc { border: 1px solid var(--rule); border-radius: 10px; padding: 1.2rem 1.4rem; margin-bottom: 2.3rem; background: var(--paper-tint); }
.toc ol { margin: .6rem 0 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.toc li { margin-bottom: .3rem; font-size: .92rem; }
@media (max-width: 620px) { .toc ol { columns: 1; } }

/* ---------------- Cards ---------------- */

.cards { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin: 2rem 0; }
.card { border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); padding: 1.5rem; }
.band--tint .card { background: var(--paper); }
.band--navy .card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); }
.card .annot { display: block; margin-bottom: .6rem; }
.card p { margin: 0; font-size: .95rem; color: var(--slate); }
.band--navy .card p { color: #C9D6E4; }
.card a { font-weight: 600; word-break: break-word; }

/* ---------------- Footer ---------------- */

.foot { border-top: 1px solid var(--rule); padding: 2.6rem 0 2.2rem; background: var(--paper-tint); }
.foot__in { display: flex; flex-wrap: wrap; gap: 1.8rem; justify-content: space-between; align-items: flex-start; }
.foot__links { display: flex; flex-wrap: wrap; gap: 1.35rem; }
.foot__links a { font-family: var(--font-brand); font-weight: 600; font-size: .9rem; color: var(--slate); text-decoration: none; }
.foot__links a:hover { color: var(--teal-deep); }
.foot__legal { margin-top: 2rem; padding-top: 1.3rem; border-top: 1px solid var(--rule); }
.foot__legal p { margin: 0; font-family: var(--font-brand); font-weight: 600; font-size: .78rem; color: var(--muted); }
.foot__legal p + p { margin-top: .4rem; }
