/* kaliamontoya.com — "cover spread"
   One idea: the first screen is a magazine cover. Kalia's photo carries it,
   her name is set quietly like a masthead, and the photo dissolves into
   night water where her links start. Mango comes back for "who I am",
   chili only for the adults-only door. Every photo of her carries an AI mark,
   burned into the image file itself (web/tools/images.py), not drawn by CSS. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-standard-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-standard-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

:root {
  --mango: #ffc23b;
  --mango-deep: #f4a422;
  --ocean: #0c3b47;
  --ocean-deep: #072a33;
  --foam: #fff3df;
  --foam-muted: #c9d8d6;
  --chili: #c92a3c;
  --chili-press: #a91f31;

  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;

  /* type scale, ratio 1.25 on a 17px body */
  --t-xs: 0.8125rem;
  --t-s: 0.9375rem;
  --t-m: 1.0625rem;
  --t-l: 1.3125rem;
  --t-xl: 1.65rem;
  --t-2xl: clamp(2.2rem, 8vw, 3.4rem);

  --gutter: 20px;
  --max: 1140px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ocean-deep);
  color: var(--ocean);
  font-family: var(--font);
  font-size: var(--t-m);
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.05; }

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

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--ocean);
  color: var(--foam);
  font-weight: 700;
  border-radius: 8px;
}
.skip:focus { top: 12px; }

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Cover: photo, name, links ---------- */

.cover {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "photo"
    "links";
  background: var(--ocean-deep);
  color: var(--foam);
}

.cover__photo {
  grid-area: photo;
  position: relative;
  margin: 0;
  height: 86vh;
  height: min(86svh, 185vw);
  overflow: hidden;
  background: radial-gradient(120% 80% at 50% 100%, #ffe08a 0%, var(--mango-deep) 70%);
}
.cover__photo picture { display: contents; }
/* Anchored to the top: crops only ever cut the bottom, never the AI mark
   burned into the top-right corner. images.py picks slot ratios to match. */
.cover__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
  animation: settle 1.6s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}
/* the photo dissolves into the water below it */
.cover__photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 58%;
  background: linear-gradient(to bottom,
    rgba(7, 42, 51, 0) 0%,
    rgba(7, 42, 51, 0.55) 45%,
    rgba(7, 42, 51, 0.92) 85%,
    var(--ocean-deep) 100%);
  pointer-events: none;
}
@keyframes settle {
  from { transform: scale(1.06); opacity: 0.4; }
  to   { transform: none; opacity: 1; }
}

.cover__intro {
  grid-area: photo;
  align-self: end;
  position: relative;
  z-index: 1;
  padding: 0 var(--gutter) 26px;
}

.name {
  font-size: clamp(3.1rem, 15.5vw, 5.4rem);
  font-weight: 300;
  font-stretch: 125%;
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin-left: -0.05em;
  color: #fff;
}
.name span { display: block; }

.hello {
  max-width: 32ch;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 2px solid var(--mango);
  border-image: linear-gradient(to right, var(--mango) 0 56px, transparent 56px) 1;
  font-size: var(--t-m);
  font-weight: 500;
  line-height: 1.45;
  color: var(--foam);
}

/* ---------- The AI mark ---------- */
/* EU Code of Practice (AI Act art. 50): every photo of Kalia carries a small
   "✦ AI" mark (variant B) burned into the file (web/tools/images.py), so downloads
   and link previews keep it too. This class only draws the same icon as a key next to
   the AI line under the links; never place it over a photo (it would double). */

.ai-mark {
  /* variant B, as burned into the photos: just "✦ AI", no pill, soft shadow */
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.ai-mark__star { font-size: 0.8em; }

/* ---------- Links ---------- */

.cover__links {
  grid-area: links;
  padding: 18px var(--gutter) 56px;
}

.links__title {
  font-size: var(--t-s);
  font-weight: 600;
  color: var(--foam-muted);
  margin-bottom: 6px;
}

.links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.links li { border-bottom: 1px solid rgba(255, 243, 223, 0.18); }

.link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  column-gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 14px 2px;
  color: inherit;
  text-decoration: none;
  font: inherit;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.link__name {
  font-size: var(--t-xl);
  font-weight: 450;
  font-stretch: 120%;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.link__handle {
  font-size: var(--t-s);
  color: var(--foam-muted);
}
.link__what {
  grid-column: 1 / -1;
  font-size: var(--t-s);
  color: var(--foam-muted);
  margin-top: 3px;
}
.link:hover .link__name,
.link:focus-visible .link__name {
  color: var(--mango);
}

/* the adults-only door */
.links li.door { border-bottom: 0; margin-top: 18px; }
.link--door {
  padding: 16px 18px;
  background: var(--chili);
  color: #fff;
  border-radius: 14px;
  align-items: center;
}
.link--door .link__what,
.link--door .link__handle { color: #fff0ee; }
.link--door:hover,
.link--door:focus-visible { background: var(--chili-press); }
.link--door:hover .link__name,
.link--door:focus-visible .link__name { color: #fff; }
.link--door:focus-visible { outline-color: var(--mango); }
.badge18 {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid #fff;
  border-radius: 50%;
  font-weight: 800;
  font-size: var(--t-s);
  font-stretch: 90%;
}
.door__note {
  margin: 10px 2px 0;
  font-size: var(--t-xs);
  color: var(--foam-muted);
}


/* ---------- About: back to the sky ---------- */

.about {
  background: var(--mango);
  color: var(--ocean);
  padding: 64px 0 72px;
}
.about h2,
.faq h2 {
  font-size: var(--t-2xl);
  font-stretch: 125%;
  font-weight: 350;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
  max-width: 16ch;
}
.about__text { max-width: 36em; }
.about__text p { font-size: var(--t-m); }
.about__text .lead {
  font-size: var(--t-l);
  font-weight: 500;
  line-height: 1.4;
}
.honest {
  margin-top: 26px;
  padding: 16px 18px;
  border-left: 5px solid var(--ocean);
  background: rgba(12, 59, 71, 0.08);
  border-radius: 0 10px 10px 0;
  font-size: var(--t-s);
}
.honest p:last-child { margin-bottom: 0; }

.moments {
  list-style: none;
  margin: 40px calc(var(--gutter) * -1) 0;
  padding: 0 var(--gutter) 6px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 68%;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}
.moments::-webkit-scrollbar { display: none; }
.moments li { scroll-snap-align: start; }
.moments figure { margin: 0; }
.moments .ai-photo { border-radius: 10px; overflow: hidden; }
.moments img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 10px;
  background: var(--mango-deep);
}
.moments figcaption {
  margin-top: 10px;
  font-size: var(--t-s);
  font-weight: 600;
  line-height: 1.35;
}

/* ---------- FAQ: night water ---------- */

.faq {
  background: var(--ocean-deep);
  color: var(--foam);
  padding: 64px 0 40px;
}
.faq__list { max-width: 44em; }
.faq details { border-bottom: 1px solid rgba(255, 243, 223, 0.18); }
.faq details:first-of-type { border-top: 1px solid rgba(255, 243, 223, 0.18); }
.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  padding: 14px 0;
  font-size: var(--t-l);
  font-weight: 550;
  line-height: 1.25;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--mango), var(--mango)) center / 100% 2.5px no-repeat,
    linear-gradient(var(--mango), var(--mango)) center / 2.5px 100% no-repeat;
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer {
  padding: 0 0 18px;
  max-width: 38em;
  color: #e9eeea;
}
.faq .answer p:last-child { margin-bottom: 0; }

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

.foot {
  background: var(--ocean-deep);
  color: var(--foam-muted);
  font-size: var(--t-s);
  padding: 28px 0 40px;
}
.foot__ai {
  color: var(--foam-muted);
  max-width: 40em;
}
.foot__mark { color: var(--mango); margin-right: 4px; }
.foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.foot__nav a { text-underline-offset: 3px; }
.foot__nav a:hover { color: var(--foam); }

/* ---------- 18+ gate ---------- */

.gate {
  width: min(100% - 32px, 440px);
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--foam);
  color: var(--ocean);
  box-shadow: 0 30px 80px rgba(7, 42, 51, 0.45);
}
.gate::backdrop {
  background: rgba(7, 42, 51, 0.82);
}
.gate[open] { animation: gate-in 0.22s ease-out; }
@keyframes gate-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.gate__body { padding: 26px 22px 22px; }
.gate h2 {
  font-size: var(--t-xl);
  font-weight: 450;
  font-stretch: 120%;
  margin-bottom: 14px;
}
.gate p { font-size: var(--t-m); }
.gate .small { font-size: var(--t-s); color: #3d6069; }
.gate__actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.btn {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 750;
  font-size: var(--t-m);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.btn--yes { background: var(--chili); color: #fff; }
.btn--yes:hover { background: var(--chili-press); }
.btn--no { background: transparent; color: var(--ocean); border-color: var(--ocean); }
.btn--no:hover { background: rgba(12, 59, 71, 0.08); }
.gate [hidden] { display: none; }

/* ---------- Legal page ---------- */

.page-top {
  background: var(--mango);
  padding: 22px 0 34px;
}
.page-top a.home {
  font-weight: 400;
  font-stretch: 125%;
  font-size: var(--t-xl);
  letter-spacing: -0.03em;
  text-decoration: none;
}
.page-top h1 {
  margin-top: 34px;
  font-size: clamp(2.4rem, 10vw, 4rem);
  font-stretch: 125%;
  font-weight: 350;
  letter-spacing: -0.03em;
}
.page-top .updated { margin: 12px 0 0; font-size: var(--t-s); }
.legal {
  background: var(--foam);
  color: var(--ocean);
  padding: 40px 0 64px;
}
.legal .wrap > * { max-width: 40em; }
.legal h2 {
  font-size: var(--t-l);
  font-weight: 800;
  margin: 34px 0 10px;
}
.legal h3 {
  font-size: var(--t-m);
  font-weight: 800;
  margin: 24px 0 8px;
}
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.4em; }
.legal .short {
  padding: 18px 20px;
  background: var(--mango);
  border-radius: 12px;
}
.legal .short ul { margin: 0; }
.todo {
  background: #ffd6d6;
  color: #7a0010;
  outline: 2px dashed #c92a3c;
  padding: 0 4px;
}

/* ---------- Wider screens ---------- */

@media (min-width: 760px) {
  :root { --gutter: 40px; }

  .cover__links {
    padding-top: 26px;
  }
  .cover__links > * { max-width: 600px; }

  .moments {
    margin: 48px 0 0;
    padding: 0;
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
  }
  .about__head { position: sticky; top: 32px; }
  .about__cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
  }
}

/* Desktop: a two-page spread. The photo is the right page, sized from the
   viewport height so the whole figure shows (5:8 file, bottom slightly cropped);
   name, links and the AI line are the left page, centred in what is left.
   Landscape-ish screens only: on portrait tablets the half-page photo would be
   a narrow strip, so they keep the full-width cover. */
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  :root { --page: min(560px, 100%); }
  .cover {
    grid-template-columns: minmax(0, 1fr) min(50vw, 72vh);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "intro photo"
      "links photo";
    min-height: 100vh;
  }
  .cover__photo {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
  }
  .cover__photo::after { display: none; }
  .cover__intro,
  .cover__links {
    justify-self: center;
    width: calc(var(--page) + 2 * clamp(40px, 5vw, 80px));
    max-width: 100%;
    padding-left: clamp(40px, 5vw, 80px);
    padding-right: clamp(40px, 5vw, 80px);
  }
  .cover__intro {
    grid-area: intro;
    align-self: start;
    padding-top: clamp(40px, 7vh, 80px);
    padding-bottom: 0;
  }
  .cover__links {
    padding-top: clamp(28px, 4.5vh, 48px);
    padding-bottom: 48px;
  }
  .cover__links > * { max-width: none; }
  .name {
    font-size: clamp(4rem, 6vw, 6.25rem);
    color: var(--foam);
  }
  .hello { font-size: var(--t-l); max-width: 30ch; margin-top: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
