/* ==========================================================================
   Ava Thorington — Marketing Portfolio
   Coastal theme: white sand, sea glass, deep ocean.
   ========================================================================== */

:root {
  /* Palette */
  --white: #ffffff;
  --shell: #f7fbfe;      /* near-white with a hint of sea */
  --foam: #eaf4fb;
  --mist: #d6e9f6;
  --shallows: #a9d1ec;
  --sea: #5ea3d3;
  --ocean: #2b78b5;
  --deep: #134d82;
  --abyss: #0b2c4d;
  --ink: #0f2a44;        /* body text */
  --ink-soft: #4a6580;   /* secondary text */
  --line: #d9e7f2;

  /* Type */
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --container: 1160px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 10px rgba(11, 44, 77, 0.06);
  --shadow: 0 18px 40px -18px rgba(11, 44, 77, 0.28);
  --shadow-lg: 0 30px 70px -30px rgba(11, 44, 77, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ocean); text-decoration: none; }
a:hover { color: var(--deep); }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  color: var(--abyss);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h2 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h3 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
h4 { font-size: 1.35rem; }

em.accent, .accent {
  font-style: italic;
  color: var(--ocean);
}

::selection { background: var(--shallows); color: var(--abyss); }

:focus-visible {
  outline: 3px solid var(--sea);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--abyss);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  z-index: 200;
}
.skip-link:focus { top: 1rem; color: var(--white); }

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

.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; position: relative; }
.section--tight { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.section--foam { background: var(--shell); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ocean);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.65;
  color: var(--ink-soft);
}

.section-head { max-width: 680px; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
    color 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary {
  background: var(--abyss);
  color: var(--white);
  box-shadow: 0 10px 24px -10px rgba(11, 44, 77, 0.6);
}
.btn--primary:hover { background: var(--deep); color: var(--white); transform: translateY(-2px); }
.btn--ghost {
  border-color: rgba(11, 44, 77, 0.25);
  color: var(--abyss);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: var(--abyss); color: var(--abyss); transform: translateY(-2px); }
.btn--light { background: var(--white); color: var(--abyss); }
.btn--light:hover { background: var(--foam); color: var(--abyss); transform: translateY(-2px); }
.btn--outline-light { border-color: rgba(255, 255, 255, 0.45); color: var(--white); }
.btn--outline-light:hover { border-color: var(--white); color: var(--white); background: rgba(255,255,255,0.08); transform: translateY(-2px); }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
  padding: 1.1rem 0;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding: 0.6rem 0;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--abyss);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand:hover { color: var(--abyss); }
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-sm);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
}
.nav-links a {
  display: inline-block;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 500;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.nav-links a:hover { background: var(--foam); color: var(--abyss); }
.nav-links .nav-cta {
  background: var(--abyss);
  color: var(--white);
  margin-left: 0.4rem;
}
.nav-links .nav-cta:hover { background: var(--deep); color: var(--white); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 1.5px;
  background: var(--abyss);
  transform: translateX(-50%);
  transition: transform 0.35s var(--ease), opacity 0.2s;
  content: "";
}
.nav-toggle span { top: 50%; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateX(-50%) translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateX(-50%) translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: block; z-index: 2; }
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(180deg, var(--white) 0%, var(--foam) 100%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
  }
  .nav-links a { font-size: 1.5rem; font-family: var(--font-display); font-weight: 600; padding: 0.6rem 1.4rem; }
  .nav-links .nav-cta { margin: 1rem 0 0; font-family: var(--font-body); font-size: 1rem; }
  .nav-open .nav-links { opacity: 1; visibility: visible; }
  .nav-open { overflow: hidden; }
}

/* ==========================================================================
   HOME — Ocean hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 40% at 78% 58%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #ffffff 0%, #f3f9fd 30%, #dcedf8 52%, #c4e1f3 62%);
}

/* soft sun hanging above the horizon */
.hero-sun {
  position: absolute;
  right: 14%;
  top: 34%;
  width: clamp(140px, 18vw, 260px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #ffffff 38%, rgba(255, 255, 255, 0) 70%);
  filter: blur(2px);
  animation: sunrise 2.4s var(--ease) both;
  pointer-events: none;
}
@keyframes sunrise {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.hero-inner {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  align-items: center;
  padding-top: 7rem;
  padding-bottom: 38vh;
}
.hero-content { max-width: 780px; }
.hero-content > * { animation: rise 1.1s var(--ease) both; }
.hero-content > *:nth-child(2) { animation-delay: 0.12s; }
.hero-content > *:nth-child(3) { animation-delay: 0.24s; }
.hero-content > *:nth-child(4) { animation-delay: 0.36s; }
.hero-content > *:nth-child(5) { animation-delay: 0.48s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  font-size: clamp(3.4rem, 10vw, 7.6rem);
  line-height: 0.95;
  font-weight: 500;
  margin-bottom: 0.25em;
  color: var(--abyss);
  letter-spacing: -0.025em;
}
.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--deep);
  margin-bottom: 1.4rem;
  min-height: 1.25em;
}
.hero-tagline .rotator {
  display: inline-block;
  font-style: italic;
  color: var(--ocean);
  position: relative;
}
.hero-tagline .rotator span {
  display: inline-block;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), filter 0.6s var(--ease);
}
.hero-tagline .rotator.is-out span { opacity: 0; transform: translateY(-14px); filter: blur(4px); }
.hero-tagline .rotator.is-in span { opacity: 0; transform: translateY(14px); filter: blur(4px); }
.hero-sub {
  max-width: 560px;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  margin-bottom: 2.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* The sea: layered, drifting waves */
.sea {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42vh;
  min-height: 260px;
  z-index: 2;
  pointer-events: none;
}
.wave {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  display: block;
  animation: drift linear infinite;
  will-change: transform;
}
.wave--1 { height: 100%; animation-duration: 140s; opacity: 0.55; }
.wave--2 { height: 84%; animation-duration: 110s; animation-direction: reverse; opacity: 0.75; }
.wave--3 { height: 64%; animation-duration: 90s; }
.wave--4 { height: 44%; animation-duration: 75s; animation-direction: reverse; }
.wave--5 { height: 20%; animation-duration: 60s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

.scroll-cue {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 22%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.scroll-cue::after {
  content: "";
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--white), transparent);
  animation: cue 2.2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes cue {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

@media (max-width: 640px) {
  .hero-inner { padding-bottom: 34vh; align-items: flex-start; padding-top: 8.5rem; }
  .hero-sun { right: -6%; top: 46%; }
  .sea { height: 34vh; }
  .scroll-cue { display: none; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}
.porthole {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 14px var(--foam), 0 0 0 15px var(--mist), var(--shadow-lg);
}
.porthole img { width: 72%; border-radius: 50%; }
.porthole::after {
  content: "";
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  border: 1px dashed var(--shallows);
  animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.about-copy h2 { margin-bottom: 0.4em; }
.about-copy .lead { color: var(--ink); }

.expertise {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 2rem;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--foam);
  color: var(--deep);
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid var(--mist);
}
.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sea);
}
.chip--plain::before { display: none; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .porthole { width: min(72%, 320px); }
}

/* ---------- Highlights / tide strip ---------- */
.tide {
  position: relative;
  background: linear-gradient(180deg, var(--shell) 0%, var(--foam) 100%);
  overflow: hidden;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}
.stat {
  position: relative;
  padding: 1.8rem 1.6rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
}
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 600;
  line-height: 1;
  color: var(--deep);
  margin-bottom: 0.6rem;
  white-space: nowrap;
  font-variant-numeric: lining-nums;
}
.stat-label { font-size: 0.95rem; line-height: 1.5; color: var(--ink); }
.stat-source {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--sea);
}
@media (max-width: 960px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Project cards ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  color: var(--ink);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--mist);
  color: var(--ink);
}
.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--foam);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.card:hover .card-media img { transform: scale(1.05); }
.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 44, 77, 0) 55%, rgba(11, 44, 77, 0.35) 100%);
}
.card-badge {
  position: absolute;
  z-index: 2;
  left: 1.1rem;
  bottom: 1.1rem;
  height: 46px;
  padding: 0.45rem 0.8rem;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
}
.card-badge img { height: 100%; width: auto; object-fit: contain; }
.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.6rem 1.7rem 1.7rem;
  flex: 1;
}
.card-index {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--sea);
}
.card-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.6vw, 2.1rem);
  font-weight: 600;
  color: var(--abyss);
  line-height: 1.1;
  margin: 0;
}
.card-role { color: var(--ink-soft); font-size: 0.97rem; }
.card-foot {
  margin-top: auto;
  padding-top: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.card-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--foam);
  color: var(--deep);
  transition: background 0.4s var(--ease), color 0.4s var(--ease), transform 0.4s var(--ease);
}
.card-arrow svg { width: 18px; height: 18px; }
.card:hover .card-arrow { background: var(--abyss); color: var(--white); transform: rotate(-45deg); }

@media (max-width: 760px) { .projects { grid-template-columns: 1fr; } }

/* ---------- Contact / footer (deep water) ---------- */
.deep-water {
  position: relative;
  color: rgba(255, 255, 255, 0.86);
  background: linear-gradient(180deg, var(--deep) 0%, var(--abyss) 70%);
  overflow: hidden;
}
.deep-water h2, .deep-water h3 { color: var(--white); }
.deep-water .eyebrow { color: var(--shallows); }
.shoreline {
  display: block;
  width: 100%;
  height: clamp(50px, 7vw, 110px);
  background: transparent;
}
.shoreline path { fill: var(--white); }
.section--foam + .deep-water .shoreline path,
.shoreline--foam path { fill: var(--shell); }

.contact { text-align: center; padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(3.5rem, 7vw, 5rem); }
.contact h2 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 500; }
.contact h2 em { color: var(--shallows); }
.contact p { max-width: 540px; margin: 0 auto 2.2rem; color: rgba(255, 255, 255, 0.78); }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; }

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 0;
  padding-bottom: 2.2rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-row a { color: rgba(255, 255, 255, 0.8); }
.footer-row a:hover { color: var(--white); }
.footer-links { display: flex; gap: 1.4rem; list-style: none; }
.social {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.social:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--white); }
.social svg { width: 16px; height: 16px; }

/* bubbles rising in the deep */
.bubbles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bubbles i {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), rgba(255,255,255,0.02) 60%);
  animation: bubble linear infinite;
}
@keyframes bubble {
  from { transform: translate3d(0, 0, 0); opacity: 0; }
  10% { opacity: 1; }
  to { transform: translate3d(20px, -110vh, 0); opacity: 0; }
}
.deep-water > *:not(.bubbles) { position: relative; z-index: 1; }

/* ==========================================================================
   CASE STUDY PAGES
   ========================================================================== */
.cs-hero {
  position: relative;
  padding: clamp(7.5rem, 14vw, 10rem) 0 0;
  background: linear-gradient(180deg, var(--white) 0%, var(--foam) 100%);
  overflow: hidden;
}
.cs-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}
.back-link {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 1.6rem;
}
.back-link svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.back-link:hover svg { transform: translateX(-3px); }
.cs-hero h1 {
  font-size: clamp(2.9rem, 7vw, 5.4rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-bottom: 0.35em;
}
.cs-hero .lead { margin-bottom: 0; }
.cs-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--white);
  aspect-ratio: 4 / 3;
}
.cs-visual img { width: 100%; height: 100%; object-fit: cover; }
.cs-visual--logo { display: grid; place-items: center; padding: 12%; }
.cs-visual--logo img { object-fit: contain; }

.meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.2rem;
}
.meta div {
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--white);
  box-shadow: var(--shadow-sm);
}
.meta dt {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sea);
  margin-bottom: 0.25rem;
}
.meta dd { margin: 0; font-size: 0.93rem; line-height: 1.45; color: var(--abyss); font-weight: 500; }

.cs-hero .shoreline { margin-top: -1px; }

@media (max-width: 900px) {
  .cs-hero-grid { grid-template-columns: 1fr; }
  .cs-visual { max-width: 560px; }
}
@media (max-width: 560px) { .meta { grid-template-columns: 1fr; } }

/* role timeline (multiple positions) */
.roles { display: grid; gap: 1rem; margin-top: 2.2rem; }
.role {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--white);
  box-shadow: var(--shadow-sm);
}
.role-dot {
  width: 12px;
  height: 12px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--sea);
  box-shadow: 0 0 0 5px var(--mist);
}
.role--current .role-dot { background: var(--ocean); }
.role h4 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin: 0 0 0.15rem; color: var(--abyss); line-height: 1.4; }
.role p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.5; }

/* Layout helpers */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split--top { align-items: start; }
.split--wide-left { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
.split--wide-right { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); }
.split--reverse > :first-child { order: 2; }
@media (max-width: 860px) {
  .split, .split--wide-left, .split--wide-right { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
}

.prose { max-width: 680px; }
.prose p { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--sea); }

/* Figures */
.figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.figure-frame {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--foam);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.figure-frame img { width: 100%; transition: transform 0.8s var(--ease); }
a.figure-frame:hover img { transform: scale(1.03); }
.figure figcaption {
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  text-align: center;
}
.figure figcaption a { font-weight: 600; display: inline-flex; align-items: center; gap: 0.3rem; }
.figure figcaption svg { width: 13px; height: 13px; }
.figure--phone { max-width: 300px; margin: 0 auto; width: 100%; }
.figure--phone .figure-frame { border-radius: 26px; border: 6px solid var(--white); box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); }
/* Social posts: Instagram's 3:4 feed ratio, image shown whole (never cropped) */
.figure--crop .figure-frame { aspect-ratio: 3 / 4; }
.figure--crop .figure-frame::before {
  content: "";
  position: absolute;
  inset: -12%;
  background: var(--post-bg) center / cover no-repeat;
  filter: blur(22px) saturate(1.1);
  opacity: 0.55;
}
.figure--crop .figure-frame img { position: relative; height: 100%; object-fit: contain; }
.figure--landscape .figure-frame { aspect-ratio: 16 / 10; }
.figure--landscape .figure-frame img { height: 100%; object-fit: cover; }
.figure--contain .figure-frame { background: var(--white); }

.ig-badge {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--abyss);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.ig-badge svg { width: 13px; height: 13px; }
a.figure-frame:hover .ig-badge, a.figure-frame:focus-visible .ig-badge { opacity: 1; transform: none; }
@media (hover: none) { .ig-badge { opacity: 1; transform: none; } }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}
.gallery--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .gallery--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .gallery--2, .gallery--3 { grid-template-columns: 1fr; } }

.gallery-caption {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}
.gallery--1 { grid-template-columns: 1fr; }


/* Tool lists */
.toolbox {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.toolbox-card {
  padding: 1.5rem 1.6rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
}
.toolbox-card h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sea);
  margin-bottom: 1rem;
}
.toolbox-card .chips { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; }
@media (max-width: 560px) { .toolbox { grid-template-columns: 1fr; } }

/* Responsibilities */
.duties {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
  counter-reset: duty;
}
.duties li {
  counter-increment: duty;
  position: relative;
  padding: 1.4rem 1.4rem 1.4rem 1.4rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  font-weight: 500;
  color: var(--abyss);
  line-height: 1.45;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.duties li:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.duties li::before {
  content: counter(duty, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  font-style: italic;
  color: var(--sea);
  margin-bottom: 0.4rem;
}
@media (max-width: 860px) { .duties { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .duties { grid-template-columns: 1fr; } }

/* Chapter blocks within a case study */
.chapter { padding: clamp(3rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--line); }
.chapter:first-of-type { border-top: 0; }
.chapter-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--sea);
  margin-bottom: 0.4rem;
  display: block;
}
.chapter h3 { margin-bottom: 0.7em; }
.chapter .gallery { margin-top: 2.5rem; }

/* Highlight callout */
.callout {
  position: relative;
  margin: 1.8rem 0;
  padding: 1.6rem 1.8rem 1.6rem 2rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--foam) 0%, var(--white) 100%);
  border: 1px solid var(--mist);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--deep);
}
.callout::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.2rem;
  bottom: 1.2rem;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(var(--sea), var(--ocean));
}
.callout small {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink-soft);
}

/* Growth metrics */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.metric {
  padding: 1.4rem 1.3rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
}
.metric-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  font-weight: 600;
  line-height: 1;
  color: var(--ocean);
  margin-bottom: 0.45rem;
}
.metric--down .metric-value { color: var(--ink-soft); }
.metric-label { font-size: 0.9rem; color: var(--ink); line-height: 1.4; }
.metrics-note { margin-top: 1.5rem; font-size: 0.95rem; color: var(--ink-soft); max-width: 760px; }
@media (max-width: 960px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.metrics.metrics--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1.6rem; max-width: 440px; }
@media (max-width: 420px) { .metrics { grid-template-columns: 1fr; } }

/* Before / after */
.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  max-width: 640px;
  margin: 0 auto;
}
.compare .figure figcaption {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--deep);
}

/* Solutions / numbered list */
.steps { list-style: none; display: grid; gap: 1rem; counter-reset: step; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 1.4rem 1.5rem 1.4rem 4.4rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 1.3rem;
  top: 1.25rem;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--abyss);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}
.steps h4 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; margin: 0.25rem 0 0.4rem; color: var(--abyss); line-height: 1.4; }
.steps ul { list-style: none; display: grid; gap: 0.3rem; }
.steps ul li { position: relative; padding-left: 1.1rem; color: var(--ink-soft); font-size: 0.97rem; }
.steps ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sea);
}

/* Awards */
.awards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.award {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
}
.award-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--foam);
  color: var(--ocean);
}
.award-icon svg { width: 22px; height: 22px; }
.award h4 { font-family: var(--font-body); font-size: 1.02rem; font-weight: 600; margin: 0 0 0.2rem; line-height: 1.4; }
.award p { margin: 0; color: var(--ink-soft); font-size: 0.93rem; }
@media (max-width: 640px) { .awards { grid-template-columns: 1fr; } }

/* Reflection (deep water band) */
.reflection {
  position: relative;
  background: linear-gradient(180deg, var(--deep) 0%, var(--abyss) 100%);
  color: rgba(255, 255, 255, 0.85);
  overflow: hidden;
}
.reflection .shoreline path { fill: var(--white); }
.reflection-inner { padding-top: clamp(3rem, 7vw, 5rem); padding-bottom: clamp(4rem, 8vw, 6rem); }
.reflection h2 { color: var(--white); }
.reflection .eyebrow { color: var(--shallows); }
.reflection .prose { max-width: 760px; }
.reflection .prose p { color: rgba(255, 255, 255, 0.85); font-size: 1.08rem; }
.reflection .prose p:first-child {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  line-height: 1.4;
  color: var(--white);
  font-weight: 500;
}

/* Next project */
.next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.next a {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.6rem 1.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--abyss);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.next a:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--mist); color: var(--abyss); }
.next small { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--sea); }
.next strong { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; line-height: 1.15; }
.next .next-forward { text-align: right; }
@media (max-width: 640px) {
  .next { grid-template-columns: 1fr; }
  .next .next-forward { text-align: left; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-stagger > * { transition-delay: calc(var(--i, 0) * 90ms); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .wave { animation: none !important; }
  .bubbles { display: none; }
  .reveal { opacity: 1; transform: none; }
}

.metric-value, .stat-value, .next strong, .card-title { font-variant-numeric: lining-nums; }

/* Utilities */
.figure--single { max-width: 380px; margin: 0 auto; width: 100%; }
.mb { margin-bottom: 1.25rem; }
.reflection a { color: var(--shallows); text-decoration: underline; text-underline-offset: 3px; }
.reflection a:hover { color: var(--white); }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--shallows); }
.reflection .shoreline--foam path, .deep-water .shoreline--foam path { fill: var(--shell); }
.duties.duties--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 480px) { .duties.duties--2 { grid-template-columns: 1fr; } }
.figure--note figcaption { justify-content: flex-start; text-align: left; font-size: 0.93rem; line-height: 1.6; }
.figure--note figcaption strong { color: var(--abyss); }
.gallery.gallery--narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.cs-visual img[src*="logo-smiles"] { object-fit: cover; }
.steps { padding: 0; margin: 0; }
.steps > li::before, .duties li::before { font-variant-numeric: lining-nums; }
@media (max-width: 480px) {
  .duties, .duties.duties--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .duties li { padding: 1rem; font-size: 0.93rem; }
  .duties li::before { font-size: 1.2rem; margin-bottom: 0.2rem; }
  .steps > li { padding: 1.1rem 1.1rem 1.1rem 3.7rem; }
  .steps > li::before { left: 1rem; top: 1.05rem; }
  .meta { grid-template-columns: 1fr 1fr; }
  .meta div:last-child { grid-column: 1 / -1; }
}
.nav-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: transparent; box-shadow: none; }
.brand { position: relative; z-index: 2; }
.site-footer { border-top: 0; }
.site-footer .footer-row { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 1.8rem; }

/* ==========================================================================
   HERO DRIFT — real project photos floating on the water
   ========================================================================== */
:root {
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .12 0 0 0 0 .2 0 0 0 0 .3 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
.hero h1 { font-size: clamp(3rem, 5.6vw, 5.4rem); white-space: nowrap; }
@media (max-width: 380px) { .hero h1 { white-space: normal; } }

.hero-visual {
  position: relative;
  justify-self: center;
  width: min(100%, 440px, 56vh);
  animation: rise 1.2s var(--ease) 0.3s both;
}

.drift {
  position: relative;
  aspect-ratio: 1;
  isolation: isolate;
  touch-action: pan-y;
}

.drift-prints { position: absolute; inset: 0; }
.drift-prints { z-index: 2; }

/* a print: positioned and turned by main.js each frame */
.print {
  --lift: 0;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--w, 140px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}
.print-shadow {
  position: absolute;
  inset: 4% 2% -2%;
  border-radius: 6px;
  background: rgba(11, 44, 77, 0.32);
  filter: blur(calc(6px + var(--lift) * 8px));
  transform: translate(calc(5px + var(--lift) * 9px), calc(8px + var(--lift) * 12px));
  opacity: calc(0.75 - var(--lift) * 0.2);
}
.print-card {
  position: relative;
  display: block;
  padding: 6.5% 6.5% 0;
  background: #fdfdfb;
  border-radius: 3px;
  box-shadow: 0 0 0 0.5px rgba(11, 44, 77, 0.08);
}
.print-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 1px;
  user-select: none;
  filter: saturate(0.92) contrast(1.02);
}
.print-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  height: calc(var(--w, 140px) * 0.2);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: calc(var(--w, 140px) * 0.092);
  line-height: 1;
  color: var(--deep);
  white-space: nowrap;
  font-variant-numeric: lining-nums;
}
.print-label svg {
  width: 0;
  height: 0.9em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: width 0.4s var(--ease), opacity 0.4s var(--ease);
}
.print.is-held .print-label svg { width: 0.9em; opacity: 1; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-visual { width: min(100%, 400px); justify-self: start; }
  .hero-inner { padding-bottom: 30vh; }
}
@media (max-width: 640px) {
  .hero-visual { justify-self: center; }
}

.print:not(.is-on), .drift:not(.is-ready) .print { visibility: hidden; }
.print.is-held { z-index: 5; }
.drift.is-intro .print { visibility: hidden; }



/* ==========================================================================
   Organic layer: paper grain, watercolor sky, painted details
   ========================================================================== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.07;
}
/* one even, pale sky above the water */
.hero { background: #f6fafd; }

.hero-tagline .rotator { isolation: isolate; }

/* About: the monogram sits on a slowly shifting watercolor pool */
.porthole {
  box-shadow: none;
  background: transparent;
  isolation: isolate;
}
.porthole::before {
  content: "";
  position: absolute;
  inset: -2%;
  z-index: -1;
  background: radial-gradient(circle at 38% 34%, #f8fbfd 0%, #e2eef7 45%, #c4ddef 80%, #b2d2ea 100%);
  border-radius: 46% 54% 58% 42% / 44% 46% 54% 56%;
  animation: pool 14s ease-in-out infinite alternate;
}
.porthole::after {
  inset: -22px;
  border: 1px solid rgba(30, 58, 90, 0.28);
  border-radius: 60% 40% 55% 45% / 45% 58% 42% 55%;
  animation: pool 18s ease-in-out infinite alternate-reverse;
}
.porthole img { border-radius: 0; width: 66%; mix-blend-mode: multiply; }
@keyframes pool {
  0% { border-radius: 46% 54% 58% 42% / 44% 46% 54% 56%; transform: rotate(0deg); }
  50% { border-radius: 58% 42% 46% 54% / 52% 60% 40% 48%; }
  100% { border-radius: 42% 58% 52% 48% / 58% 42% 58% 42%; transform: rotate(8deg); }
}

/* ==========================================================================
   HERO STORY — before the prints arrive, a few moments are shot and posted,
   the card flips to its insights, then the last photo lands as a print.
   Steps are classes set by main.js.
   ========================================================================== */
.story {
  position: absolute;
  inset: 0;
  z-index: 4;
  container-type: size;
  pointer-events: none;
  font-family: var(--font-body);
}
.story.is-playing { pointer-events: auto; cursor: pointer; }
.story-card {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 60cqw;
  height: max-content;
  perspective: 1100px;
  will-change: transform;
}
.story-flip {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.6, 0, 0.25, 1);
}
.story-front,
.story-back {
  border-radius: 3.4cqw;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.story-front {
  position: relative;
  padding: 3.2cqw;
  background: rgba(255, 255, 255, 0);
  box-shadow: 0 0 0 0 rgba(11, 44, 77, 0);
  transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.story-back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 4cqw 4cqw 3.6cqw;
  background: var(--white);
  box-shadow: 0 30px 60px -28px rgba(11, 44, 77, 0.45), 0 0 0 1px rgba(11, 44, 77, 0.05);
  transform: rotateY(180deg);
  color: var(--ink-soft);
}

/* header: account and "Posted" */
.story-head {
  display: flex;
  align-items: center;
  gap: 2cqw;
  height: 8cqw;
  margin-bottom: 2.4cqw;
  color: var(--ink);
  opacity: 0;
  transform: translateY(2cqw);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.story-avatar {
  flex: none;
  width: 7.2cqw;
  height: 7.2cqw;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 0.45cqw var(--white), 0 0 0 0.8cqw var(--shallows);
}
.story-avatar img { width: 100%; height: 100%; object-fit: cover; }
.story-name { font-size: 3.1cqw; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-posted {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.7cqw;
  padding: 0.9cqw 2cqw 0.9cqw 1.4cqw;
  border-radius: 99px;
  background: var(--foam);
  color: var(--deep);
  font-size: 2.6cqw;
  font-weight: 600;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.3s var(--ease) 0.5s, transform 0.5s cubic-bezier(0.34, 1.7, 0.5, 1) 0.5s;
}
.story-posted svg { width: 3cqw; height: 3cqw; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* the photo, seen through a viewfinder while the moments are shot */
.story-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 1.4cqw;
  overflow: hidden;
  background: var(--abyss);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.story-shot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(7px) saturate(0.7);
  transform: scale(1.08);
}
.story-photo.is-sharp .story-shot { filter: none; transform: none; transition: filter 0.22s ease-out, transform 0.5s var(--ease); }
.story-finder { position: absolute; inset: 7%; transition: opacity 0.35s var(--ease); }
.story-finder i {
  position: absolute;
  width: 18%;
  height: 18%;
  border: 0 solid var(--white);
  opacity: 0;
  transform: scale(1.35);
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease);
}
.story-finder i:nth-child(1) { top: 0; left: 0; border-width: 2px 0 0 2px; transform-origin: 0 0; }
.story-finder i:nth-child(2) { top: 0; right: 0; border-width: 2px 2px 0 0; transform-origin: 100% 0; }
.story-finder i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 2px 2px; transform-origin: 0 100%; }
.story-finder i:nth-child(4) { bottom: 0; right: 0; border-width: 0 2px 2px 0; transform-origin: 100% 100%; }
.story-finder b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22%;
  height: 22%;
  margin: -11% 0 0 -11%;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 2px;
  opacity: 0;
}
.story-photo.is-focusing .story-finder b { animation: story-focus 0.45s ease-in-out both; }
@keyframes story-focus {
  0% { opacity: 0; transform: scale(1.5); }
  50% { opacity: 1; transform: scale(0.9); }
  100% { opacity: 1; transform: none; }
}
.story-flash { position: absolute; inset: 0; background: var(--white); opacity: 0; }
.story-photo.is-sharp .story-flash { animation: story-flash 0.45s ease-out both; }
@keyframes story-flash { 0% { opacity: 0.95; } 100% { opacity: 0; } }
/* shot counter in the corner of the viewfinder */
.story-count {
  position: absolute;
  top: 10%;
  right: 11%;
  font-size: 2.6cqw;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--white);
  text-shadow: 0 1px 4px rgba(11, 44, 77, 0.5);
  transition: opacity 0.3s var(--ease);
}

/* camera roll: each shot drops in as a thumbnail */
.story-roll {
  position: absolute;
  left: 3.2cqw;
  right: 3.2cqw;
  bottom: 3.2cqw;
  display: flex;
  justify-content: center;
  gap: 1.6cqw;
  transition: opacity 0.3s var(--ease);
}
.story-roll i {
  width: 9cqw;
  height: 9cqw;
  border-radius: 1.2cqw;
  background: var(--mist) center / cover no-repeat;
  box-shadow: 0 0 0 0.6cqw var(--white), 0 4px 12px -4px rgba(11, 44, 77, 0.4);
  opacity: 0;
  transform: translateY(-6cqw) scale(1.6);
  transition: opacity 0.25s var(--ease), transform 0.5s cubic-bezier(0.34, 1.5, 0.5, 1);
}
.story-roll i.is-in { opacity: 1; transform: none; }

/* hearts floating up off the post */
.story-hearts { position: absolute; right: 8%; bottom: 6%; width: 10cqw; height: 10cqw; }
.story-hearts i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 5.5cqw;
  height: 5.5cqw;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 20.5s-7.5-4.6-7.5-10.2A4.3 4.3 0 0 1 12 7.6a4.3 4.3 0 0 1 7.5 2.7c0 5.6-7.5 10.2-7.5 10.2z'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 1px 3px rgba(11, 44, 77, 0.35));
  opacity: 0;
}

/* footer: actions, carousel dots and a caption being written */
.story-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.6cqw;
  padding-top: 2.6cqw;
  opacity: 0;
  transform: translateY(-1.5cqw);
  transition: opacity 0.45s var(--ease) 0.1s, transform 0.45s var(--ease) 0.1s;
}
.story-foot svg {
  width: 5.2cqw;
  height: 5.2cqw;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.story-dots { display: flex; gap: 1cqw; margin-left: auto; margin-right: 1cqw; }
.story-dots i { width: 1.4cqw; height: 1.4cqw; border-radius: 50%; background: var(--mist); }
.story-dots i:last-child { background: var(--sea); }
.story-caption { flex-basis: 100%; display: grid; gap: 1.3cqw; }
.story-caption i {
  display: block;
  height: 1.5cqw;
  border-radius: 99px;
  background: var(--mist);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease) 0.25s;
}
.story-caption i:first-child { width: 86%; }
.story-caption i:last-child { width: 54%; transition-delay: 0.6s; }

/* the back: insights */
.story-bhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 2.5cqw;
}
.story-bhead > span:first-child {
  font-size: 2.4cqw;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sea);
}
.story-legend { display: inline-flex; align-items: center; gap: 0.8cqw; white-space: nowrap; }
.story-legend i { width: 3cqw; height: 0; border-top: 2px solid var(--ocean); }
.story-legend i.is-then { margin-left: 1.4cqw; border-top: 2px solid var(--shallows); }
.story-yoy, .story-run { display: inline-flex; align-items: center; gap: 0.8cqw; }
.story-run,
.story.is-total .story-yoy,
.story.is-total .story-then,
.story.is-total .story-gap { display: none; }
.story.is-total .story-run { display: inline-flex; }
.story-kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 1.6cqw; margin-top: 4.5cqw; }
.story-num {
  font-family: var(--font-display);
  font-size: 11cqw;
  font-weight: 600;
  line-height: 0.85;
  color: var(--deep);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}
.story-kpi span { font-size: 2.8cqw; font-weight: 500; line-height: 1.25; color: var(--ink); }
.story-kpi em { display: block; font-style: normal; font-size: 2.2cqw; color: var(--ink-soft); }
.story-graph { display: block; width: 100%; height: 30cqw; margin: auto 0; overflow: visible; }
.story-grid { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.story-gap { fill: var(--mist); opacity: 0; }
.story-then, .story-now {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.story-then { stroke: var(--shallows); stroke-width: 1.7; }
.story-now { stroke: var(--ocean); stroke-width: 2.2; }

/* 1 · viewfinder: corners snap in */
.story.s-finder .story-photo { opacity: 1; }
.story.s-finder .story-finder i { opacity: 1; transform: none; }

/* 2 · posted: the post builds itself around the last shot */
.story.s-post .story-finder,
.story.s-post .story-count,
.story.s-post .story-roll { opacity: 0; }
.story.s-post .story-front { background: var(--white); box-shadow: 0 30px 60px -28px rgba(11, 44, 77, 0.45), 0 0 0 1px rgba(11, 44, 77, 0.05); }
.story.s-post .story-head,
.story.s-post .story-foot { opacity: 1; transform: none; }
.story.s-post .story-posted { opacity: 1; transform: none; }
.story.s-post .story-caption i { transform: none; }
.story.s-post .story-like { fill: var(--sea); stroke: var(--sea); animation: story-pop 0.45s cubic-bezier(0.34, 1.8, 0.5, 1) 0.6s both; }
@keyframes story-pop { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }
.story.s-post .story-hearts i { animation: story-heart 1.8s cubic-bezier(0.2, 0.6, 0.4, 1) 0.55s both; }
.story.s-post .story-hearts i:nth-child(2) { animation-delay: 0.75s; --dx: -5cqw; }
.story.s-post .story-hearts i:nth-child(3) { animation-delay: 0.95s; --dx: 3cqw; }
.story.s-post .story-hearts i:nth-child(4) { animation-delay: 1.15s; --dx: -9cqw; }
.story.s-post .story-hearts i:nth-child(5) { animation-delay: 1.35s; --dx: -2cqw; }
@keyframes story-heart {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  20% { opacity: 1; transform: translate(calc(var(--dx, 0px) * 0.3), -6cqw) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx, 0px), -34cqw) scale(0.8); }
}

/* 3 · insights: the card turns over; this year pulls away from last year */
.story.s-insights .story-flip { transform: rotateY(180deg); }
.story.s-insights .story-then { animation: story-draw 0.9s var(--ease) 0.55s both; }
.story.s-insights .story-now { animation: story-draw 1.3s var(--ease) 0.75s both; }
.story.s-insights .story-gap { animation: story-fade 0.6s ease 1.9s both; }
@keyframes story-draw { to { stroke-dashoffset: 0; } }
@keyframes story-fade { to { opacity: 0.7; } }

/* 4 · landing: back to the photo, the chrome falls away and it flies to its spot as a print */
.story.s-land .story-head,
.story.s-land .story-foot,
.story.s-land .story-hearts { opacity: 0; transition: opacity 0.25s ease; transition-delay: 0s; }
.story.s-land .story-front { background: rgba(255, 255, 255, 0); box-shadow: 0 0 0 0 rgba(11, 44, 77, 0); }
.story.s-gone { opacity: 0; transition: opacity 0.25s ease; }

/* Home page: scrolling settles on each screen (desktop only; long sections
   still scroll freely inside, the snap just catches their edges) */
@media (min-width: 900px) and (min-height: 600px) {
  html.snap { scroll-snap-type: y mandatory; }
  html.snap .hero,
  html.snap main > section { scroll-snap-align: start; }
  html.snap #contact { scroll-snap-align: end; }
  html.snap #highlights {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
  }
  html.snap #highlights > .container { width: 100%; }
}

/* stat numbers count up; fixed-width digits keep the card from twitching */
.stat-value { font-variant-numeric: lining-nums tabular-nums; }

/* the longest project name gets a slightly smaller label so it fits the print */
.print[href$="glidewell-dental.html"] .print-label { font-size: calc(var(--w, 140px) * 0.066); }
/* a long account name wraps to two tighter lines instead of being cut off */
.story.is-longname .story-name { white-space: normal; font-size: 2.7cqw; line-height: 1.15; }
