@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/dm-sans-regular.ttf") format("truetype");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/dm-sans-variable.ttf") format("truetype");
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/lora-variable.ttf") format("truetype");
}

:root {
  color-scheme: light;
  /* White page surfaces; the language pill keeps the app timer colour. */
  --page: #FFFFFF;
  --mobile-wall: #EEE6DF; /* Average RGB of the portrait photo's top 24 rows. */
  --text: #1E1E1E;
  --muted: #5D6259;
  --line: #DDDCD5;
  --surface: #FFFFFF;
  --accent: #555F4F;
  --icon-green: #727D69;
  --font-body: "DM Sans", sans-serif;
  --font-title: "Lora", Georgia, serif;
  --intro-size: 1rem;
  --intro-leading: 1.375rem;
  --link-size: 1rem;
  --link-leading: 1.375rem;
  --footer-height: 3.5rem;
  --parent-control: #F4F3EC;
  --control-outset: 3px; /* 38 px visible surface inside a 44 px touch target. */
  --control-height: max(44px, calc(2.375rem + 2px));
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --control-top: calc(max(.5rem, var(--safe-top)) + 10px);
  font-family: var(--font-body);
  font-synthesis: none;
  font-optical-sizing: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; background: var(--page); color: var(--text); font-size: 1rem; line-height: 1.5; }
p, h1, h2 { margin: 0; }
a { color: inherit; text-underline-offset: .25em; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: 3px; }
img { display: block; max-width: 100%; }

/* Desktop keeps the photo and footer inside one viewport.
   Mobile overrides this with a full, uncropped portrait in normal flow. */
.home-page {
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  display: grid;
  grid-template-rows: minmax(var(--hero-min-height, 0px), 1fr) auto;
}
.home-hero {
  /* Keep the lower wood visible for the caption, beneath the complete feather. */
  --photo-width: max(100cqw, calc((100cqh - var(--credit-extra, 0px)) * 1486 / 1059));
  --photo-bottom: var(--credit-extra, 0px);
  --wall-height: calc(100cqh - var(--credit-extra, 0px) - var(--photo-width) * 530 / 1486);
  --photo-band: 530;
  --photo-source-width: 1486;
  --photo-anchor: 1059;
  --control-space: calc(var(--control-top) + var(--control-height, 44px) + .25rem);
  min-height: 0;
  position: relative;
  isolation: isolate;
  container-type: size;
  container-name: hero;
}
/* At enlarged text sizes, repeat only the empty lower wood behind the
   extra caption space. The photograph itself retains its aspect ratio. */
.home-hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: var(--credit-extra, 0px);
  z-index: -1;
  background: url("assets/lookie-desktop.png") center bottom / var(--photo-width) auto;
  pointer-events: none;
}
.hero-photo { position: absolute; inset: 0; z-index: -1; overflow: clip; }
.hero-photo img {
  position: absolute;
  left: 50%;
  bottom: var(--photo-bottom);
  width: var(--photo-width);
  max-width: none;
  height: auto;
  transform: translateX(-50%);
}

/* Center the complete text block in the wall above the repositioned boot. */
.hero-copy {
  height: var(--wall-height);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--control-space) 1rem .75rem;
  text-align: center;
}
.hero-copy-inner { width: min(100%, 29rem); }
.brand { line-height: 0; }
.brand img { --logo-width: 7.6875rem; width: calc(var(--logo-width) * .9); height: auto; margin-inline: auto; }
.home-title {
  max-width: 14ch;
  margin: 1.5rem auto 0;
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 2.25rem;
  line-height: 2.5rem;
  text-wrap: balance;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.intro { max-width: 18.5rem; margin: .75rem auto 0; font-size: var(--intro-size); line-height: var(--intro-leading); font-weight: 400; text-wrap: balance; }
.availability { margin: .5rem auto 0; font-size: .875rem; line-height: 1.25rem; font-weight: 400; text-wrap: balance; }
.photo-credit {
  position: absolute;
  inset-inline: max(24px, env(safe-area-inset-left, 0px)) max(24px, env(safe-area-inset-right, 0px));
  bottom: 12px;
  text-align: center;
  color: var(--text);
  font: 400 .875rem/1.25rem var(--font-body);
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.language-control {
  position: absolute;
  top: var(--control-top);
  right: max(16px, env(safe-area-inset-right, 0px));
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 44px;
  max-width: calc(100% - 32px);
  border-radius: 999px;
  isolation: isolate;
}
.language-control::before { content: ""; position: absolute; inset: var(--control-outset) 0; z-index: -1; border-radius: inherit; background: var(--parent-control); pointer-events: none; }
.home-page .language-control::before { background: var(--surface); }
.language-control select {
  appearance: none;
  -webkit-appearance: none;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: inherit;
  min-height: 44px;
  padding: .5rem 32px .5rem 44px;
  font: 500 1rem/1.375 var(--font-body);
  cursor: pointer;
  max-width: 100%;
}
.language-control select:focus { outline: none; }
.native-language { display: flex; align-items: center; min-width: 0; max-width: 100%; }
.desktop-language { display: none; }
.desktop-language summary { display: flex; align-items: center; min-height: 44px; padding: .5rem 32px .5rem 44px; font-size: 1rem; font-weight: 500; cursor: pointer; list-style: none; }
.desktop-language summary::-webkit-details-marker { display: none; }
.desktop-language summary:focus { outline: none; }
.language-control select:focus-visible, .desktop-language summary:focus-visible { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .25em; }
.desktop-language nav { position: absolute; top: calc(100% + 8px); right: 0; min-width: 100%; padding: .375rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 4px 16px #1e1e1e12; }
.desktop-language nav::before { content: ""; position: absolute; top: -9px; left: 0; right: 0; height: 9px; }
.desktop-language nav a { display: block; min-height: 44px; padding: .625rem .75rem; font-weight: 400; text-decoration: none; border-radius: 10px; }
.desktop-language nav a:hover, .desktop-language nav a[aria-current] { background: var(--parent-control); }
.language-control svg { position: absolute; width: 16px; height: 16px; pointer-events: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.language-control .language-globe { left: 14px; width: 22px; height: 22px; color: var(--icon-green); stroke-width: 1.7; }
.language-chevron { right: 12px; }
.language-fallback { position: relative; z-index: 3; padding: 4rem 1rem 0; text-align: right; }

.site-footer { background: var(--surface); padding-bottom: var(--safe-bottom); }
.privacy-page .site-footer { border-top: 1px solid #E5E5E5; }
.footer-inner {
  width: min(100% - 6rem, 84rem);
  min-height: var(--footer-height);
  margin-inline: auto;
  padding-block: .375rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  column-gap: 1rem;
  row-gap: 0;
}
.copyright { font-size: .875rem; line-height: 1.375rem; font-weight: 400; white-space: nowrap; }
.footer-links { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; flex: 0 0 auto; max-width: 100%; margin-left: auto; gap: 0 16px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .6875rem 0;
  font-size: var(--link-size);
  line-height: var(--link-leading);
  font-weight: 500;
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }

.privacy-page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.page-toolbar, .page-shell { width: min(100% - 48px, 42rem); margin-inline: auto; }
.page-toolbar { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: var(--control-top); }
.page-toolbar .language-control { position: relative; top: auto; right: auto; max-width: 100%; margin-left: auto; }
.page-toolbar noscript { flex-basis: 100%; }
.page-toolbar .language-fallback { padding: 0; }
.page-shell { flex: 1; }
.privacy-content { padding-block: calc(1.5rem - var(--control-outset)) 6rem; overflow-wrap: anywhere; }
.back-button { position: relative; isolation: isolate; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: calc(-1 * var(--control-outset)); border-radius: 999px; color: var(--text); text-decoration: none; font-size: 1rem; line-height: 1.375; font-weight: 500; }
.back-button::before { content: ""; position: absolute; inset: var(--control-outset); z-index: -1; border-radius: inherit; background: var(--parent-control); pointer-events: none; }
.back-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.back-button:hover { text-decoration: none; }
.back-button:focus-visible { outline: 2px solid var(--icon-green); outline-offset: 3px; border-radius: 999px; }
.back-label { display: none; }
.privacy-content > h1 {
  margin-bottom: .75rem;
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.2;
}
.section-label { margin-bottom: 2rem; color: var(--muted); font-size: .875rem; }
.privacy-content h2 { font-family: var(--font-title); font-size: 1.375rem; line-height: 1.35; font-weight: 500; }
.privacy-content article { font-size: 1.125rem; line-height: 1.65; }
.privacy-content > h1 + article { margin-top: 1.5rem; }
.privacy-content article section + section { margin-top: 2.5rem; }
.privacy-content article h2 { margin-bottom: .75rem; }
.privacy-content article p + p { margin-top: 1rem; }

/* Adapt the hierarchy to the actual available photo height. */
@container hero (max-height: 760px) {
  .brand img { --logo-width: 6.91875rem; }
  .home-title { margin-top: .75rem; font-size: 2rem; line-height: 2.25rem; }
  .intro { margin-top: .5rem; }
}

/* Desktop dimensions from the supplied app/Figma reference:
   123 × 40 logo at y=110, then 48 px to the 36/40 heading and 16 px to 18/26 copy. */
@media (min-width: 701px) {
  .native-language { display: none; }
  .desktop-language { display: block; }
  .language-control { right: max(3rem, calc((100vw - 84rem) / 2)); }
  .back-button { width: auto; height: auto; min-height: 44px; padding: .5rem 1rem .5rem .625rem; gap: .25rem; }
  .back-label { display: inline; }
  .hero-copy { align-items: flex-start; padding-top: max(110px, var(--control-space)); padding-inline: 3rem; }
  .hero-copy-inner { width: min(100%, 80rem); }
  .brand img { width: 7.6875rem; }
  .home-title {
    max-width: none;
    margin-top: 3rem;
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
  .intro { max-width: none; margin-top: 1rem; font-size: 1.125rem; line-height: 1.625rem; }
}

/* Leave wall above and wood below the objects on lower laptop screens. */
@media (min-width: 701px) and (max-height: 850px) {
  .hero-copy { padding-top: clamp(24px, calc(100dvh - 732px), 64px); }
  .home-title { margin-top: 1rem; }
}

@media (min-width: 701px) and (max-width: 1000px) {
  .hero-copy { padding-top: max(88px, var(--control-space)); }
}

/* The complete portrait sets the mobile hero height, regardless of Safari's
   current toolbar height. Both layers share a grid row; longer or enlarged
   text can add extra wall above the intact photograph. */
@media (max-width: 700px) {
  .home-page { height: auto; display: block; }
  .home-page .language-control { right: max(24px, env(safe-area-inset-right, 0px)); max-width: calc(100% - 48px); }
  .home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    container-type: inline-size;
    background: var(--mobile-wall);
    padding-bottom: var(--credit-extra, 0px);
  }
  .home-hero::after { background-image: url("assets/lookie-mobile.png"); background-size: 100% auto; }
  .hero-photo { position: relative; inset: auto; grid-area: 1 / 1; align-self: end; display: block; width: 100%; overflow: visible; }
  .hero-photo img { position: static; width: 100%; max-width: 100%; height: auto; transform: none; }
  .hero-copy {
    grid-area: 1 / 1;
    align-self: start;
    align-items: flex-start;
    height: auto;
    padding-top: max(30cqw, calc(var(--control-top) + var(--control-height) + 24px));
    /* Source boot starts at y=1110; keep at least 32 px between text and the
       boot, allowing the row to grow when a translation needs extra lines. */
    padding-bottom: calc(100cqw * 1162 / 941 + 32px);
    padding-inline: max(24px, env(safe-area-inset-left, 0px)) max(24px, env(safe-area-inset-right, 0px));
  }
  .hero-copy-inner { width: 100%; max-width: 24rem; }
  .brand img { width: 7.6875rem; }
  .home-title { margin-top: 3rem; font-size: 2.25rem; line-height: 2.5rem; font-weight: 600; }
  .intro { margin-top: 1rem; font-size: 1.125rem; line-height: 1.625rem; }
  .home-page .site-footer { padding-top: 0; padding-bottom: calc(40px + var(--safe-bottom)); }
  .home-page .footer-inner { padding-block: calc(.375rem - 2px) calc(.375rem + 2px); }
  .footer-inner {
    width: calc(100% - 32px);
  }
  .privacy-content { padding-block: calc(1.5rem - var(--control-outset)) 3rem; }
}

.error-page { min-height: 100svh; display: grid; place-items: center; padding: 2rem; text-align: center; }
.error-page h1 { font-family: var(--font-title); font-weight: 500; font-size: 2rem; margin-bottom: 1.5rem; }
