/* Enter Pilates · see src/DESIGN.md */

/* Barnebok by backpacker.gr: free for commercial use, credit requested (see footer) */
@font-face {
  font-family: "Barnebok";
  src: url("/assets/fonts/barnebok-vf.ttf") format("truetype");
  font-weight: 300 900; font-display: swap;
}

/* Palette from the new studio: chalk walls, stone, the eucalyptus wall, espresso wood */
:root {
  --chalk: #F3F0E8;
  --stone: #E4DFD3;
  --eucalyptus: #48605A;
  --espresso: #302923;
  --muted: #6A615A;
  --mist: #C9D4CE;
  --line: #D6CFC1;

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 64px;
  --section: clamp(72px, 9vw, 128px);
  --wrap: 1280px;
  --pad: 20px;
  --gap: 24px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 250ms;
  --slow: 600ms;
  color-scheme: light;
}
@media (min-width: 768px) { :root { --pad: 40px; --gap: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--s2)); }
body {
  margin: 0; background: var(--chalk); color: var(--espresso);
  font-family: "Barnebok", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px; line-height: 1.75; font-weight: 400;
  -webkit-tap-highlight-color: rgba(72, 96, 90, 0.15);
  touch-action: manipulation; overflow-wrap: break-word;
}
@media (min-width: 1024px) { body { font-size: 18px; } }

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: var(--eucalyptus); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--espresso); }
:focus-visible { outline: 2px solid var(--eucalyptus); outline-offset: 3px; }

.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(--s2); top: -100px; z-index: 100; background: var(--espresso); color: #fff; padding: var(--s1) var(--s2); }
.skip:focus { top: var(--s1); color: #fff; }

.wrap {
  max-width: var(--wrap); margin-inline: auto;
  padding-inline: max(var(--pad), env(safe-area-inset-left)) max(var(--pad), env(safe-area-inset-right));
}
.grid { display: grid; gap: var(--s4) var(--gap); }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); } }
.grid > * { min-width: 0; }

/* Type: light, large and quiet */
h1, h2, h3 { margin: 0 0 var(--s3); font-weight: 300; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2.8rem, 6vw, 5.6rem); line-height: 1.04; letter-spacing: -0.02em; }
h2 { font-size: clamp(2.5rem, 4.6vw, 4.2rem); line-height: 1.06; letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; line-height: 1.35; font-weight: 500; letter-spacing: 0; margin-bottom: var(--s2); }
p { margin: 0 0 1.1em; text-wrap: pretty; }
.lead { font-size: 1.15em; line-height: 1.6; }
.label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--muted); margin-bottom: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; min-height: 50px; padding: 0 var(--s3);
  border-radius: 2px; background: var(--eucalyptus); color: #fff;
  font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.btn:hover { background: var(--espresso); color: #fff; }
.btn-light { background: var(--chalk); color: var(--espresso); }
.btn-light:hover { background: #fff; color: var(--espresso); }
.btn-small { min-height: 44px; padding: 0 var(--s2); font-size: 0.95rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--chalk); border-bottom: 1px solid var(--line); transition: background-color var(--slow) var(--ease), border-color var(--slow) var(--ease); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; flex: none; }
.brand:hover { color: inherit; }
.brand img { width: 44px; height: 44px; }
.brand-name { font-size: 1.2rem; font-weight: 500; letter-spacing: 0; white-space: nowrap; }
.site-header .brand { color: var(--espresso); }

.site-nav { display: flex; align-items: center; gap: var(--s2); }
.nav-list { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-list a, .sub-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px;
  color: var(--espresso); text-decoration: none; font: inherit; font-size: 0.95rem;
  background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.nav-list a:hover, .sub-toggle:hover { color: var(--eucalyptus); }
.nav-list a[aria-current="page"], .has-sub.is-current > .sub-toggle { text-decoration: underline; text-underline-offset: 0.4em; }
.chev { width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.sub-toggle[aria-expanded="true"] .chev { transform: translateY(1px) rotate(225deg); }
.has-sub { position: relative; }
.sub { list-style: none; margin: 0; padding: var(--s1) 0; }
.nav-end { display: flex; align-items: center; gap: var(--s2); }
.lang-switch { font-size: 0.95rem; color: var(--espresso); padding: 10px 4px; }

.menu-toggle { display: none; width: 48px; height: 48px; margin-right: -12px; border: 0; background: none; color: var(--espresso); cursor: pointer; align-items: center; justify-content: center; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 22px; height: 1.5px; background: currentColor; }
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -7px; }
.menu-icon::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }

@media (min-width: 1140px) {
  .sub { position: absolute; left: 0; top: 100%; min-width: 290px; background: var(--chalk); border: 1px solid var(--line); display: none; }
  .sub a { display: flex; width: 100%; padding: 0 var(--s2); color: var(--espresso); }
  .sub-toggle[aria-expanded="true"] + .sub { display: block; }
}
@media (max-width: 1139px) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    flex-direction: column; align-items: stretch; gap: var(--s4);
    padding: var(--s2) var(--pad) calc(var(--s4) + env(safe-area-inset-bottom));
    background: var(--chalk); overflow-y: auto; overscroll-behavior: contain;
    display: flex; visibility: hidden; opacity: 0; transform: translateY(-12px);
    transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease), visibility 0s linear var(--slow);
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-list a, .sub-toggle { width: 100%; min-height: 58px; padding: 0; justify-content: space-between; font-size: 1.35rem; font-weight: 300; }
  .sub { display: none; padding: 0 0 var(--s2); }
  .sub-toggle[aria-expanded="true"] + .sub { display: block; }
  .sub a { min-height: 44px; font-size: 1.05rem; color: var(--muted); }
  .nav-end { justify-content: space-between; }
  body.menu-open { overflow: hidden; }
}

/* Header over a full-screen photo: transparent at the top, solid once you scroll.
   Only with JavaScript, so the header is always readable without it. */
.js .has-hero .site-header { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; }
.js .has-hero .site-header:not(.is-solid) .nav-list > li > a, .js .has-hero .site-header:not(.is-solid) .sub-toggle { font-weight: 500; }
.js .has-hero .site-header:not(.is-solid) .brand,
.js .has-hero .site-header:not(.is-solid) .nav-list > li > a,
.js .has-hero .site-header:not(.is-solid) .sub-toggle,
.js .has-hero .site-header:not(.is-solid) .lang-switch,
.js .has-hero .site-header:not(.is-solid) .menu-toggle { color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35); }
.js .has-hero .site-header:not(.is-solid) .btn { background: var(--chalk); color: var(--espresso); }
.js .has-hero .site-header.is-solid { background: var(--chalk); border-color: var(--line); }
@media (max-width: 1139px) {
  .js .has-hero .site-header:not(.is-solid) .site-nav a, .js .has-hero .site-header:not(.is-solid) .site-nav .sub-toggle { color: var(--espresso); }
}

/* ========== Full-screen photographs ========== */
.hero-full { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--espresso); }
.hero-full > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
/* Directional shade: dark where the words sit (lower left), clear where the teacher's face is (upper right) */
.hero-full::after { content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 16, 13, 0.5) 0%, rgba(20, 16, 13, 0.15) 11%, rgba(20, 16, 13, 0) 22%),
    linear-gradient(72deg, rgba(20, 16, 13, 0.78) 0%, rgba(20, 16, 13, 0.55) 28%, rgba(20, 16, 13, 0.12) 50%, rgba(20, 16, 13, 0) 62%); }
.hero-content { position: relative; z-index: 1; width: 100%; padding-bottom: clamp(36px, 6vh, 72px); }
.hero-full h1 { color: #fff; font-size: clamp(2.8rem, 5.2vw, 5.4rem); line-height: 1.02; margin-bottom: var(--s3); }
.hero-full p { max-width: 30em; color: rgba(255, 255, 255, 0.94); font-size: 1.1em; }
.hero-full .actions { margin-top: var(--s3); }

.full-photo { position: relative; margin: 0; }
.full-photo img { width: 100%; height: 100svh; min-height: 480px; object-fit: cover; }
@media (max-width: 767px) { .full-photo img { height: 70svh; min-height: 360px; } }

/* Sections */
.section { padding-block: var(--section); }
.section-stone { background: var(--stone); --line: #C5BEAF; }

/* Two shared layouts for every page
   .pair:  a heading or lead on the left (5 columns), the text on the right
   .media: text on the left (7 columns), a photo or list on the right
   .page-top: the first block of an inner page without a photo cover */
.page-top { padding-block: clamp(40px, 5vw, 76px) var(--section); }
.page-top > h1, .gallery header { margin-bottom: clamp(32px, 4vw, 64px); }
.pair img, .media img, .story-cover img { width: 100%; }
.pair > .lead-xl { color: var(--eucalyptus); margin-bottom: 0; }
.pair figure + figure { margin-top: var(--s4); }
.pair header .photo { width: fit-content; }
@media (min-width: 768px) {
  .pair, .media { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .pair > :first-child { grid-column: 1 / 6; }
  .pair > :last-child { grid-column: 6 / 13; padding-left: 4vw; }
  .media > :first-child { grid-column: 1 / 8; padding-right: 3vw; }
  .media > :last-child { grid-column: 8 / 13; }
}
@media (min-width: 768px) and (min-height: 760px) {
  .pair > :first-child, .media > :last-child { position: sticky; top: calc(var(--header-h) + var(--s4)); }
}
figcaption { padding-top: var(--s1); font-size: 0.9rem; color: var(--muted); }
.list { list-style: none; margin: 0 0 var(--s4); padding: 0; }
.list li { border-top: 1px solid var(--line); padding-block: 12px; }

/* Classes and prices */
.timetable h1 { max-width: 10em; }
.timetable h2, .packages h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); }
.timetable .lead { color: var(--eucalyptus); margin-bottom: var(--s1); }
.times {
  list-style: none; margin: 0; padding: 0; font-variant-numeric: tabular-nums;
  display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, auto);
  grid-auto-flow: column; column-gap: var(--gap); font-size: clamp(1rem, 1.85vw, 1.55rem);
}
.times li { padding: 9px 0; border-top: 1px solid var(--line); }
.packages .price-grid { margin: 0; }
.full-photo.class-room img { height: 54svh; min-height: 300px; }
.pkg { font-size: 1.05rem; }
.pkg small { display: block; font-size: 0.85rem; color: var(--muted); }
.amt { font-size: 1.6rem; font-weight: 300; line-height: 1; white-space: nowrap; }

/* Home: classes at a glance, prices as the headline numbers */
.classes-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2) var(--s4); margin-bottom: var(--s4); }
.classes-head h2 { margin: 0; }
.classes-head p { margin: 0; color: var(--muted); }
.price-grid { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); font-variant-numeric: tabular-nums; }
.price-grid li { border-top: 1px solid var(--line); padding-top: var(--s2); }
.price-grid .amt { display: block; font-size: clamp(2.4rem, 4.4vw, 3.8rem); line-height: 1.05; margin-bottom: 6px; }
.price-grid .pkg { color: var(--muted); }

/* Home: the closing invitation */
.invite { font-size: clamp(2.4rem, 5.4vw, 5.2rem); font-weight: 300; line-height: 1.04; letter-spacing: -0.025em; margin: 0 0 var(--s4); max-width: 14em; }
.phone-xl, .contact-list .phone { display: block; width: fit-content; font-size: clamp(2rem, 4.1vw, 3.6rem); font-weight: 300; letter-spacing: -0.02em; line-height: 1.18; text-decoration: none; color: var(--eucalyptus); font-variant-numeric: tabular-nums; }
.phone-xl:hover, .contact-list .phone:hover { color: var(--espresso); }
.visit { color: var(--muted); margin-top: var(--s3); }

/* Large opening text, one column */
.lead-xl { font-size: clamp(1.7rem, 2.9vw, 2.6rem); font-weight: 300; line-height: 1.3; letter-spacing: -0.01em; max-width: 24em; margin-bottom: var(--s4); }

/* The one coloured section: the founders, on the eucalyptus of the studio wall */
.section-euca { background: var(--eucalyptus); color: var(--chalk); }
.section-euca a:not(.btn) { color: var(--chalk); }
.section-euca a:not(.btn):hover { color: #fff; }
.section-euca :focus-visible { outline-color: var(--chalk); }
.section-euca figcaption { color: rgba(243, 240, 232, 0.75); }
.founders { align-items: center; }
@media (min-width: 1024px) {
  .founders > figure { grid-column: 1 / 8; }
  .founders > div { grid-column: 9 / 13; }
}
.founders h2 { margin-bottom: var(--s4); }

/* Signature phrase from the studio's own copy */
.phrase { margin: 0 0 var(--s5); font-size: clamp(2.6rem, 6.4vw, 6.2rem); font-weight: 300; line-height: 0.98; letter-spacing: -0.03em; }
.phrase span { display: block; white-space: nowrap; }
.phrase .strengthen { padding-left: 0.55em; }
.phrase .taller { padding-left: 1.1em; }
.phrase .phrase-end { padding-left: 3.7em; margin-top: 0.5em; font-size: max(0.3em, 1.05rem); white-space: normal; letter-spacing: 0; line-height: 1.3; color: var(--eucalyptus); font-weight: 400; }
.phrase-text > p:not(.phrase) { max-width: 30em; }
@media (min-width: 1024px) {
  .phrase-text { grid-column: 1 / 9; align-self: center; }
  .phrase-photo { grid-column: 9 / 13; }
}
.phrase-photo img { width: 100%; max-height: 90svh; object-fit: cover; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: var(--s2); padding: 18px 0; font-size: 1.1em; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--eucalyptus); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--eucalyptus); }
.faq details > p { color: var(--muted); }

/* Inner pages: only what is specific to one page */
.prose { max-width: 38em; }
.prose > :last-child, .role { margin-bottom: 0; }
.prose-legal h2 { font-size: 1.4rem; font-weight: 500; margin-top: var(--s4); }
.funding h1 { font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.12; margin-bottom: var(--s4); }
blockquote { margin: 0 0 var(--s2); }
blockquote p { font-size: clamp(1.55rem, 2.5vw, 2.3rem); font-weight: 300; line-height: 1.3; color: var(--eucalyptus); margin: 0; }
.role, .page-top header p { color: var(--muted); }

/* Story: the founders on eucalyptus, photo left, title right */
.story-cover { padding-block: clamp(48px, 6vw, 96px); }
.story-cover .grid { align-items: center; }
.story-cover h1 { margin: 0; }
@media (min-width: 768px) {
  .story-cover .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .story-cover figure { grid-column: 1 / 8; }
  .story-cover h1 { grid-column: 8 / 13; }
}

/* Team: two biographies, divided by a line */
.bio + .bio { margin-top: var(--section); padding-top: var(--section); border-top: 1px solid var(--line); }
.bio h2 { margin: var(--s3) 0 var(--s1); font-size: clamp(1.8rem, 3.4vw, 3rem); }

/* Studio: photo cover, then a night view of the room */
.studio-cover.hero-full { min-height: 82svh; }
.studio-cover.hero-full h1 { margin: 0; }
.studio-evening.full-photo img { height: 78svh; }

/* Method */
.method h1 { margin-bottom: var(--s4); }
.principles { list-style: none; padding: 0; margin: var(--s5) 0 0; }
.principles li { display: grid; gap: var(--s1) var(--gap); border-top: 1px solid var(--line); padding-block: var(--s3); }
.principles li:last-child { padding-bottom: 0; }
.principles h3 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.5rem); font-weight: 300; line-height: 1.15; color: var(--eucalyptus); }
.principles p { margin: 0; max-width: 38em; }
@media (min-width: 768px) { .principles li { grid-template-columns: 2fr 3fr; } }

/* Contact */
.contact-list { list-style: none; margin: var(--s4) 0 0; padding: 0; }
.contact-list li { padding: 14px 0; border-top: 1px solid var(--line); }

/* Gallery: two studies of movement, then the room by day and by night */
.gallery header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--s2); }
.gallery header > * { margin: 0; }
.gallery header p { color: var(--muted); }
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
.photo-grid img { width: 100%; }
main .photo-grid a[data-lightbox] { display: block; padding: 0; cursor: zoom-in; }
@media (min-width: 768px) {
  .photo-grid { display: flex; flex-wrap: wrap; }
  .photo-grid li { flex: 1 0 calc((100% - var(--gap)) / 2); min-width: 0; }
  /* The opening landscape and portrait share a baseline at their natural ratios. */
  .photo-grid li:first-child { flex: 1.5 0 0; }
  .photo-grid li:nth-child(2) { flex: 0.658 0 0; }
  .photo-grid li:nth-child(3) { flex-basis: 100%; }
}

.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: var(--s5) var(--s2); border: 0; background: rgba(28, 23, 19, 0.97); color: #fff; overscroll-behavior: contain; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(28, 23, 19, 0.97); }
.lightbox figure { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; min-width: 0; gap: var(--s1); justify-items: center; }
.lightbox img { max-width: min(100%, 1600px); max-height: calc(100vh - 160px); width: auto; height: auto; }
.lightbox figcaption { font-size: 0.95rem; color: #E2DAD0; text-align: center; }
.lb-btn { position: fixed; width: 48px; height: 48px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 2px; background: rgba(0, 0, 0, 0.3); color: #fff; font-size: 1.3rem; cursor: pointer; }
.lb-btn:hover { background: rgba(0, 0, 0, 0.6); }
.lb-btn:focus-visible { outline-color: #fff; }
.lb-close { top: var(--s2); right: var(--s2); }
.lb-prev { left: var(--s2); top: 50%; transform: translateY(-50%); }
.lb-next { right: var(--s2); top: 50%; transform: translateY(-50%); }

/* Footer */
.site-footer { background: var(--espresso); color: #E6DED3; padding: var(--s5) 0 calc(var(--s4) + env(safe-area-inset-bottom)); font-size: 0.95rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--mist); }
.site-footer :focus-visible { outline-color: #fff; }
.footer-grid { display: grid; gap: var(--s4) var(--gap); }
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / 6; }
  .footer-grid > :nth-child(2) { grid-column: 7 / 10; }
  .footer-grid > :nth-child(3) { grid-column: 10 / 13; }
}
.footer-brand .brand, .footer-brand .brand:hover { color: #fff; margin-bottom: var(--s2); }
.footer-brand p { max-width: 30em; }
.footer-title { font-size: 0.85rem; font-weight: 500; color: var(--mist); margin-bottom: var(--s1); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { padding: 3px 0; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s5); padding-top: var(--s3); border-top: 1px solid rgba(255, 255, 255, 0.18); }
.espa { background: #fff; padding: 4px; }
.espa img { width: 360px; max-width: 100%; }
.footer-meta { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); list-style: none; margin: 0; padding: 0; }

/* ========== Motion ==========
   Two moments only, both on the home page: the headline rises when the page opens, and the phrase
   «Μακραίνω. Δυναμώνω. «Ψηλώνω»…» acts out its words once when it scrolls into view.
   Everything else is feedback: links, buttons, the header, the menu, FAQ answers, gallery photos.
   Hidden starting states need .js and no reduced-motion preference, so content never depends on motion. */
:root { interpolate-size: allow-keywords; }
a { text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); transition: color var(--fast) var(--ease), text-decoration-color var(--fast) var(--ease), text-underline-offset var(--fast) var(--ease); }
a:hover { text-decoration-color: currentColor; text-underline-offset: 0.32em; }
.photo-grid a { display: block; overflow: hidden; }
.photo-grid img { transition: transform var(--slow) var(--ease); }
.photo-grid a:hover img { transform: scale(1.03); }
.faq details::details-content { height: 0; overflow: clip; transition: height var(--slow) var(--ease), content-visibility var(--slow) allow-discrete; }
.faq details[open]::details-content { height: auto; }

.line { display: block; overflow: hidden; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.line > span { display: block; }
.m-only { display: none; }
.phrase .lengthen { transform-origin: left center; }
.phrase .strengthen { font-weight: 420; }

@media (prefers-reduced-motion: no-preference) {
  /* 1. Arrival: the headline rises line by line */
  .hero-full h1 .line > span { animation: rise 1200ms var(--ease) both; }
  .hero-full h1 .line:nth-child(2) > span { animation-delay: 150ms; }

  /* 2. Movement: each word does what it says */
  .js [data-scene] .phrase span { transition: transform 1200ms var(--ease), opacity 1200ms var(--ease), font-weight 1200ms var(--ease); transition-delay: var(--d, 0ms); }
  .js [data-scene]:not(.in-view) .phrase .lengthen { transform: scaleX(0.86); opacity: 0; }
  .js [data-scene]:not(.in-view) .phrase .strengthen { font-weight: 300; opacity: 0; }
  .js [data-scene]:not(.in-view) .phrase .taller { transform: translateY(0.35em); opacity: 0; }
  .js [data-scene]:not(.in-view) .phrase .phrase-end { opacity: 0; }
}
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }

@media print {
  .phrase span, .hero-full h1 .line > span { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* ========== Phones: a vertical photographic editorial ==========
   Not the desktop collapsed: the photo and the words take turns, type is set for a hand-held screen,
   facts are compact, and motion is closer and quieter. */
@media (max-width: 767px) {
  :root { --pad: 22px; --section: 60px; --gap: 20px; }
  body { font-size: 16px; line-height: 1.7; }
  h1 { font-size: clamp(2.1rem, 10vw, 2.5rem); line-height: 1.08; }
  h2 { font-size: clamp(1.75rem, 8.2vw, 2rem); line-height: 1.12; letter-spacing: -0.015em; }
  figcaption { font-size: 0.84rem; }
  .m-only { display: inline; }

  /* Hero: the photograph above, the words beneath it, one composition */
  .hero-full { display: block; min-height: 0; background: var(--chalk); color: var(--espresso); }
  .hero-full > img { position: relative; height: 62svh; min-height: 360px; object-position: 57% 30%; }
  .hero-full::after { bottom: auto; height: 62svh; min-height: 360px; background: linear-gradient(180deg, rgba(20, 16, 13, 0.45) 0%, rgba(20, 16, 13, 0.12) 14%, rgba(20, 16, 13, 0) 26%); }
  .hero-content { padding-top: 28px; padding-bottom: 8px; }
  .hero-full h1 { color: var(--espresso); font-size: clamp(2.15rem, 10.4vw, 2.5rem); line-height: 1.06; margin-bottom: 18px; }
  .hero-full p { color: var(--muted); font-size: 1rem; }
  .hero-full .actions { margin-top: 20px; }
  .hero-full .btn-light { background: var(--eucalyptus); color: #fff; }
  .hero-full .btn { width: 100%; justify-content: center; }

  .lead-xl { font-size: clamp(1.4rem, 6.4vw, 1.6rem); line-height: 1.38; margin-bottom: 24px; }
  .full-photo img { height: 72svh; min-height: 380px; }

  /* Classes: the weekday timetable in two columns, prices as a 2 by 2 grid */
  .classes-intro .btn { width: 100%; justify-content: center; }

  /* Founders and phrase: the photo first, then the words */
  .founders h2 { margin-bottom: 20px; }
  .phrase { font-size: clamp(2.3rem, 11vw, 2.75rem); margin-bottom: 32px; }
  .phrase-photo img { max-height: 78svh; }
  .invite { font-size: clamp(1.9rem, 8.6vw, 2.15rem); line-height: 1.1; }

  .faq summary { min-height: 48px; align-items: center; }
  .story-cover { padding-block: 0 36px; }
  .story-cover .grid, .pair, .media { row-gap: 24px; }
  .pair > :is(h1, h2, .lead-xl), .pair > header > :last-child { margin-bottom: 0; }
  .story-cover figure { margin-inline: calc(-1 * var(--pad)); }
  .story-cover figcaption { padding-inline: var(--pad); font-size: 0.84rem; }
  .studio-cover.hero-full { min-height: 0; }
  .studio-cover.hero-full > img, .studio-cover.hero-full::after { height: 55svh; min-height: 300px; }
  .studio-evening.full-photo img { height: 50svh; min-height: 280px; }
  .principles li { grid-template-columns: minmax(0, 1fr); }
  .method > div { display: contents; }
  .method h1 { margin: 0; }
  .method figure { grid-row: 2; max-width: 440px; justify-self: center; }
  .method figcaption p { margin: 0; }
  .principles { margin-top: 32px; }
  .principles li { padding-block: 20px; }
  .contact-list { margin-top: 24px; }
  .contact-list .phone { padding-block: 4px; }
  .contact figure { margin-inline: calc(-1 * var(--pad)); }
  .contact { padding-bottom: 0; }
  .gallery header p { font-size: 0.94rem; }
  .photo-grid li:nth-child(2) { width: 80%; justify-self: center; }
  .photo-grid li:nth-child(3) { margin-inline: calc(-1 * var(--pad)); }
  .lightbox { height: 100dvh; padding: 64px 0 88px; }
  .lightbox figcaption { padding-inline: var(--pad); }
  .lightbox img { max-height: calc(100dvh - 250px); }
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
  .timetable { gap: 32px; }
  .timetable h2 { margin-bottom: 16px; }
  .packages .pkg { font-size: 1rem; }
  .classes-head { display: block; }
  .classes-head h2 { margin-bottom: 12px; }
  .price-grid { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .price-grid .amt { font-size: 2.2rem; }
  /* Bigger touch area for text links, with no change to the layout */
  main a:not(.btn) { padding-block: 0.45em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .photo-grid a:hover img { transform: none; }
}
