/* The Tale Haus — built from the Figma file "The Tale Haus" (desktop 1440),
 * with a few extra touches: live clock + status in the top bar, sticky pill
 * nav that tracks the section in view, numbered side labels, a moving brand
 * strip, hover details on tiles, and a gentle rise as sections scroll in.
 */
:root {
  --teal: #249ea1;
  --teal-dark: #1f8c8f;
  --ink: #002425;
  --deep: #0a4445;
  --grey: #eaeaea;
  --band: #d9dcdb;
  --muted: #5d7071;
  --white: #fff;
  --sans: "Montserrat", system-ui, sans-serif;
  --serif: "DM Serif Display", Georgia, serif; /* stand-in for Austena */
  --small: "Nunito", system-ui, sans-serif;
  --wrap: 957px;
  --gutter: 16px;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(16px, 1.4vw, 20px);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
.serif { font-family: var(--serif); font-weight: 400; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 0.8em; height: 0.8em; flex: none; vertical-align: -0.05em; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* ── Media + placeholders ─────────────────────────────── */
.media { position: relative; overflow: hidden; background: #c3e2e3; }
.media img, .media video, .media iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.media .ph-label { display: none; }
.media.is-ph {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(135deg, #2aa9ac, #1b7f82);
}
.media.is-ph .ph-label {
  display: block;
  position: absolute;
  left: 16px;
  bottom: 12px;
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Top bar ──────────────────────────────────────────── */
.topbar { background: var(--grey); }
.topbar-inner {
  max-width: 1198px;
  margin: 0 auto;
  min-height: 150px;
  padding: 0 var(--gutter) 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo { display: flex; align-items: center; gap: 8px; color: var(--teal); text-decoration: none; }
.logo img { height: 66px; width: auto; }
.logo-mark { font: 400 44px/1 var(--serif); letter-spacing: -0.06em; }
.logo-text { font: 400 13px/1.05 var(--serif); letter-spacing: 0.06em; }
.divider { width: 2px; height: 63px; background: var(--ink); flex: none; }
.info { display: grid; gap: 2px; font-weight: 600; font-size: 17px; line-height: 1.2; }
.info small { font-size: 12px; font-weight: 500; color: var(--muted); }
.clock { font-variant-numeric: tabular-nums; }
.btn-connect {
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  padding: 6px 18px;
  border-radius: 22px;
  white-space: nowrap;
  transition: background 0.2s;
}
.btn-connect:hover { background: var(--deep); }

/* ── Pill nav (sticky) ────────────────────────────────── */
.pill-nav {
  position: sticky;
  top: calc(12px + env(safe-area-inset-top, 0px));
  z-index: 20;
  width: min(955px, calc(100% - 2 * var(--gutter)));
  height: 70px;
  margin: -35px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(36, 158, 161, 0.92);
  border-radius: 30px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  transition: height 0.3s, width 0.3s, background 0.3s;
}
.pill-nav.stuck {
  height: 56px;
  width: min(760px, calc(100% - 2 * var(--gutter)));
  background: rgba(36, 158, 161, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.pill-nav a {
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  padding: 8px 10px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.pill-nav a:hover, .pill-nav a[aria-current="page"] { border-bottom-color: var(--white); }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative;
  width: min(1198px, calc(100% - 2 * var(--gutter)));
  margin: -35px auto 0;
  aspect-ratio: 1198 / 497;
  min-height: 300px;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
}
.hero .hero-media { position: absolute; inset: 0; }
.hero .hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0, 36, 37, 0.1), rgba(0, 36, 37, 0.35)); }
.hero .side-label { display: none; }
.hero-copy { position: relative; display: grid; justify-items: center; gap: 12px; padding: 40px 20px 0; color: var(--white); text-align: center; }
.hero h1 {
  font: 400 clamp(34px, 4.25vw, 61px)/1.05 var(--serif);
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.tagline { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; }
.ready { display: grid; justify-items: center; gap: 6px; margin-top: 16px; }
.ready small { font-size: 12px; opacity: 0.85; }
.ready .dash-btn { font-size: 15px; padding: 6px 24px; }

/* ── Home blocks ──────────────────────────────────────── */
.block { position: relative; padding: 40px var(--gutter) 0; scroll-margin-top: 80px; }
.block > .head { max-width: 1198px; margin: 0 auto 40px; }
.block h2 { font-size: 1em; font-weight: 700; }
.block .head p { margin-top: 2px; }

/* Numbered side labels, in the left margin on wide screens */
.side-label { display: none; }
@media (min-width: 1300px) {
  .side-label {
    display: block;
    position: absolute;
    /* pin to the page edge even inside centred blocks */
    left: calc(28px - (100vw - 100%) / 2);
    top: 44px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font: 600 13px/1 var(--sans);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
  }
  .site-footer .side-label { top: 80px; }
}

.card, .project-tile {
  position: relative;
  display: grid;
  place-items: center;
  max-width: var(--wrap);
  margin: 0 auto;
  aspect-ratio: 957 / 273;
  min-height: 180px;
  color: var(--white);
  text-decoration: none;
  overflow: hidden;
}
.card > .media, .project-tile > .media { position: absolute; inset: 0; }
.card .media img, .project-tile .media img { transition: transform 0.6s ease; }
.card:hover .media img, .project-tile:hover .media img { transform: scale(1.04); }
.card { border-radius: 50px; }
.card .media .ph-label, .project-tile .media .ph-label { display: none; }
.card-copy { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; }
.card-copy strong { font: 400 clamp(24px, 2.4vw, 34px)/1.1 var(--serif); }
.card-copy small { font-size: 13px; opacity: 0.85; margin-bottom: 10px; }

.dash-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4px 31px;
  border: 1px dashed currentColor;
  border-radius: 40px;
  font-weight: 700;
  text-align: center;
  color: var(--white);
  text-decoration: none;
  transition: background 0.2s;
}
a:hover .dash-btn, .dash-btn:hover { background: rgba(255, 255, 255, 0.15); }
.dash-btn.dark { color: var(--ink); border-radius: 10px; padding: 2px 18px; }
.dash-btn.dark:hover { background: var(--grey); }

/* Trusted brands — a slowly moving strip */
.brands-block { padding-left: 0; padding-right: 0; }
.brands-block .head { padding: 0 var(--gutter); margin-bottom: 0; }
.brands { margin-top: 16px; min-height: 141px; background: var(--band); display: flex; align-items: center; overflow: hidden; }
.brands-track { display: flex; align-items: center; gap: 72px; width: max-content; padding-left: 72px; animation: brands 32s linear infinite; }
.brands:hover .brands-track { animation-play-state: paused; }
@keyframes brands { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .brands-track { animation: none; } }
.brands img { height: 56px; width: auto; filter: grayscale(1); opacity: 0.85; }
.brand-ph { font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; font-size: 14px; color: rgba(0, 36, 37, 0.55); white-space: nowrap; }

.index-head {
  max-width: var(--wrap);
  margin: -24px auto 24px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  font-weight: 700;
}
.index-head span { justify-self: center; border-bottom: 1px solid var(--ink); padding: 0 4px; }
.index-head span:last-child { justify-self: start; padding-left: 130px; }

.project-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 17px; }
.tile-title { position: relative; display: grid; gap: 4px; font-weight: 700; text-align: center; padding: 0 16px; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4); }
.tile-title small { font-size: 13px; font-weight: 500; opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.3s; }
.tile-id { position: absolute; left: 24px; top: 18px; font-weight: 700; font-size: 14px; letter-spacing: 0.1em; opacity: 0.85; }
.tile-view { position: absolute; right: 24px; bottom: 18px; display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 700; opacity: 0; transition: opacity 0.3s; }
.project-tile:hover .tile-title small, .project-tile:focus-visible .tile-title small { opacity: 0.9; transform: none; }
.project-tile:hover .tile-view, .project-tile:focus-visible .tile-view { opacity: 1; }

.btn-outline {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 22px;
  border: 1px solid var(--teal);
  border-radius: 20px;
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: var(--teal); color: var(--white); }

.service-grid {
  max-width: 955px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 17px 15px;
}
.service-tile {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 470 / 273;
  background: var(--teal);
  border-radius: 30px;
  text-decoration: none;
  overflow: hidden;
  transition: background 0.25s, transform 0.25s;
}
.service-tile:hover, .service-tile:focus-visible { background: var(--teal-dark); transform: translateY(-3px); }
.blurb {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  color: var(--white);
  font-size: 14px;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
}
.service-tile:hover .blurb, .service-tile:focus-visible .blurb { opacity: 0.95; transform: none; }

.about { max-width: calc(955px + 2 * var(--gutter)); margin: 0 auto; padding-top: 90px; padding-bottom: 40px; }
.about h2 { text-align: center; margin-bottom: 12px; }
.about p + p { margin-top: 14px; }

/* Sections rise in slightly as they scroll into view (content stays visible) */
.rise { transform: translateY(24px); transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.rise.in { transform: none; }

/* ── Footer ───────────────────────────────────────────── */
.site-footer { position: relative; background: var(--grey); padding: 53px var(--gutter) 0; margin-top: 120px; }
.footer-card {
  max-width: 955px;
  margin: 0 auto;
  min-height: 520px;
  background: var(--teal);
  color: var(--white);
  border-radius: 50px 50px 0 0;
  padding: 140px 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 60px;
  font-size: 12px;
}
.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-cols h3 {
  font-size: 12px;
  font-weight: 600;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--white);
  width: max-content;
  min-width: 140px;
}
.footer-cols p { margin-bottom: 14px; }
.footer-cols a { text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.footer-cols a:hover { text-decoration: underline; }
.notify input {
  display: block;
  width: 100%;
  max-width: 350px;
  height: 31px;
  margin: 18px 0 16px;
  padding: 0 16px;
  border: 1px solid var(--deep);
  border-radius: 45px;
  background: transparent;
  color: var(--white);
  font: inherit;
}
.notify input::placeholder { color: rgba(255, 255, 255, 0.7); }
.notify button {
  display: block;
  width: 192px;
  height: 31px;
  margin: 0 0 30px 79px;
  border: 0;
  border-radius: 45px;
  background: var(--deep);
  color: var(--white);
  font: inherit;
  cursor: pointer;
}
.notify button:hover { background: var(--ink); }
.notify .fine { max-width: 450px; }
.copyright { text-align: center; }

/* ── Sub-pages ────────────────────────────────────────── */
.page-head { padding: 64px var(--gutter) 40px; text-align: center; }
.page-head h1 { font-size: 24px; }
.project-list.full { padding: 0 var(--gutter); }
.project-tile.tall { align-content: end; gap: 20px; padding-bottom: 20px; }
.project-tile.tall .tile-title { align-self: center; margin-bottom: auto; padding-top: 80px; }
.project-tile.tall .dash-btn { border-radius: 10px; font-size: 24px; font-weight: 400; padding: 0 30px; min-width: 232px; }

.backrow { max-width: calc(1120px + 2 * var(--gutter)); margin: 0 auto; padding: 24px var(--gutter) 0; }
.back { display: inline-flex; align-items: center; gap: 10px; font: 400 16px var(--small); text-decoration: none; }
.back:hover span { text-decoration: underline; }
.project-hero { padding: 0 var(--gutter); }
.project-hero .hero-media { max-width: 1120px; margin: 13px auto 0; aspect-ratio: 1120 / 491; border-radius: 46px; }
.project-hero .hero-media.is-ph { background: #c3e2e3; }
.details { max-width: calc(1120px + 2 * var(--gutter)); margin: 0 auto; padding: 20px calc(var(--gutter) + 29px) 0; }
.details small { font: 400 14px var(--small); }
.meta-row { display: flex; justify-content: space-between; }
.meta-row div { display: grid; gap: 4px; font-size: 24px; }
.meta-row .right { text-align: right; }
.meta-row strong { font: 400 16px var(--sans); border-top: 1px solid #000; padding-top: 6px; min-width: 87px; }
.collections { text-align: center; display: grid; justify-items: center; gap: 6px; margin: 12px 0 0; }
.collections h2 { font-size: 24px; }
.collections .dash-btn { font-size: 20px; margin-top: 6px; }

.moments { max-width: calc(1120px + 2 * var(--gutter)); margin: 0 auto; padding: 120px var(--gutter) 0; scroll-margin-top: 80px; }
.moments h2.big { font-size: 36px; margin-bottom: 36px; }
.moments h3 { font-size: 24px; margin: 0 0 6px; }
.moments .film { aspect-ratio: 1120 / 491; margin-bottom: 36px; }
.moments .media.is-ph, .project-hero .media.is-ph { background: #c3e2e3; }
.moments .media.is-ph .ph-label, .project-hero .media.is-ph .ph-label { color: rgba(0, 36, 37, 0.45); }
.collage { columns: 2; column-gap: 17px; }
.shot { break-inside: avoid; margin-bottom: 47px; }
.shot.large { aspect-ratio: 563 / 491; }
.shot.wide { aspect-ratio: 501 / 250; width: 89%; }
.shot.tall { aspect-ratio: 305 / 398; width: 54%; margin-left: auto; margin-right: auto; }
.shot:nth-child(4n + 2) { margin-left: auto; }

.service { max-width: calc(957px + 2 * var(--gutter)); margin: 0 auto; padding: 60px var(--gutter) 40px; scroll-margin-top: 80px; }
.service h2 { font-size: clamp(28px, 3.4vw, 48px); font-weight: 400; text-transform: uppercase; line-height: 1.5; padding-left: 7px; }
.service .media { aspect-ratio: 957 / 440; margin: 8px 0 34px; background: var(--teal); }
.service p { font-size: 18px; line-height: 1.5; padding-left: 7px; }

/* ── Mid-size: drop the status cell ───────────────────── */
@media (max-width: 1100px) {
  .hide-md { display: none; }
}

/* ── Phones / small tablets ───────────────────────────── */
@media (max-width: 760px) {
  .topbar-inner { min-height: 0; padding: 16px var(--gutter) 50px; gap: 12px; }
  .divider { display: none; }
  .info { font-size: 12px; }
  .info small { font-size: 10px; }
  .topbar-inner .info:first-of-type { display: none; }
  .logo-mark { font-size: 32px; }
  .logo-text { font-size: 10px; }
  .logo img { height: 44px; }
  .btn-connect { font-size: 13px; padding: 6px 12px; }
  .pill-nav { height: 52px; border-radius: 26px; margin-top: -26px; }
  .pill-nav.stuck { height: 48px; width: calc(100% - 2 * var(--gutter)); }
  .pill-nav a { font-size: 13px; padding: 6px 4px; }
  .hero { margin-top: -26px; border-radius: 24px; aspect-ratio: 4 / 5; min-height: 0; }
  .card { border-radius: 28px; }
  .card, .project-tile { aspect-ratio: 16 / 9; }
  .index-head span:last-child { padding-left: 24px; }
  .tile-title small, .tile-view, .blurb { opacity: 0.9; transform: none; }
  .service-grid { grid-template-columns: 1fr; }
  .service-tile { aspect-ratio: 16 / 8; border-radius: 22px; font-size: 14px; }
  .blurb { font-size: 12px; bottom: 14px; }
  .brands { min-height: 96px; }
  .brands-track { gap: 40px; }
  .footer-card { padding: 60px 24px 32px; border-radius: 30px 30px 0 0; }
  .footer-cols { grid-template-columns: 1fr; gap: 32px; }
  .notify button { margin-left: 0; }
  .project-hero .hero-media { border-radius: 24px; aspect-ratio: 4 / 3; }
  .details { padding: 20px var(--gutter) 0; }
  .moments { padding-top: 80px; }
  .collage { columns: 1; }
  .shot, .shot.wide, .shot.tall { width: 100%; margin-bottom: 17px; }
  .project-tile.tall .dash-btn { font-size: 18px; min-width: 0; }
  .project-tile.tall .tile-title { padding-top: 40px; }
}
