/* Wedding website (alicepellerinvasconcelos.com), from the validated mockup E (site-mariage/maquettes).
   Animations: transform, opacity and clip-path only, no library, all off when the visitor asks for reduced motion. */

:root {
  --white: #ffffff;
  --stone: #ffffff;
  --ink: #2f2d2a;
  --text: #4f4b45;
  --soft: #74706a;
  --line: #ebe8e3;
  --accent: #866a5f;
  --accent-deep: #6f564c;
  --thin: "Jost", "Futura", system-ui, sans-serif;
  --serif: "Gilda Display", Georgia, serif;
  --italic: "Cormorant Garamond", Garamond, serif;
  --gutter: clamp(16px, 4vw, 56px);
  --nav-h: 84px;
  --screen: 100svh;
  /* Quick start, very soft landing */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font: 300 .95rem/1.8 var(--thin); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: #e6ddd2; color: var(--ink); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 40; padding: .9rem 1.3rem; background: var(--ink); color: var(--white); font: 400 .64rem/1 var(--thin); letter-spacing: .22em; text-transform: uppercase; translate: 0 -200%; transition: translate .3s ease; }
.skip:focus { translate: none; }

/* Cross-fade between pages (recent browsers; elsewhere, a normal page load) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .6s; animation-timing-function: ease; }

/* Display titles: serif caps (Gilda Display), one italic word (Cormorant Garamond, Gilda has no italic), very thin sans caps */
.label { margin: 0 0 1.5rem; font: 400 .66rem/1.5 var(--thin); letter-spacing: .26em; text-transform: uppercase; color: var(--soft); }
.display { margin: 0; font: 300 clamp(1.9rem, 4.3vw, 3.95rem)/1.04 var(--serif); letter-spacing: .02em; text-transform: uppercase; text-wrap: balance; }
.display em { font-family: var(--italic); font-style: italic; text-transform: none; letter-spacing: 0; }
.display .thin { font-family: var(--thin); font-weight: 200; letter-spacing: .01em; }
.display--s { font-size: clamp(1.7rem, 3.25vw, 3rem); }
/* Sentence-case title, for the inquiry blocks */
.title { margin: 0; font: 300 clamp(2rem, 4.15vw, 3.8rem)/1.1 var(--serif); text-wrap: balance; }
.title em { font-family: var(--italic); font-style: italic; }
.lede { max-width: 30em; margin: 1.8rem auto 0; font: italic 300 clamp(1.15rem, 1.6vw, 1.4rem)/1.6 var(--italic); color: var(--text); text-wrap: pretty; }
.prose { max-width: 34em; margin-top: 1.8rem; }
.prose p { margin: 0 0 1.1em; color: var(--text); text-wrap: pretty; }
.rule { width: 46px; height: 1px; margin: 0 0 1.4rem; border: 0; background: var(--ink); opacity: .5; }
.center { text-align: center; }
.center .rule, .center .prose { margin-left: auto; margin-right: auto; }

/* Underlined links: on hover, the line leaves to the right and comes back from the left */
.link, .head-row a { padding-bottom: .4rem; background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px; font: 400 .64rem/1 var(--thin); letter-spacing: .24em; text-transform: uppercase; }
.link { display: inline-block; margin-top: 2rem; }
.link:hover, .head-row a:hover { animation: underline .9s var(--ease-io); }
@keyframes underline {
  0% { background-position: 100% 100%; background-size: 100% 1px; }
  45% { background-position: 100% 100%; background-size: 0 1px; }
  55% { background-position: 0 100%; background-size: 0 1px; }
  100% { background-position: 0 100%; background-size: 100% 1px; }
}

/* Thin oval buttons: on hover, the colour slides in from the left and the dash grows */
.pill { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: .9rem; padding: 1.05rem 1.9rem; border: 1px solid var(--accent); border-radius: 999px; background: none; color: var(--accent); font: 400 .64rem/1 var(--thin); letter-spacing: .22em; text-transform: uppercase; cursor: pointer; transition: color .5s var(--ease); }
.pill::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent); transform: scaleX(0); transform-origin: right center; transition: transform .7s var(--ease-io); }
.pill::after { content: ""; width: 16px; height: 1px; background: currentColor; transition: width .5s var(--ease); }
.pill:hover { color: var(--white); }
.pill:hover::before { transform: scaleX(1); transform-origin: left center; }
.pill:hover::after { width: 26px; }
.pill--solid { background: var(--accent); color: var(--white); }
.pill--solid::before { background: var(--accent-deep); }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }

.block { padding: clamp(5.5rem, 11vw, 9.5rem) var(--gutter); }
.block--flush-top { padding-top: 0; }
.tint { background: var(--stone); }
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; max-width: 1200px; margin: 0 auto 2.6rem; }
.head-row .label { margin: 0; }

/* Menu: serif signature in the middle, like the name of the opening; hidden over the opening photo */
.nav { position: fixed; inset: 0 0 auto; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--nav-h); padding: 0 var(--gutter); background: rgba(255, 255, 255, .97); transform: translateY(-100%); opacity: 0; transition: transform .7s var(--ease), opacity .7s ease; }
.nav.is-visible { transform: none; opacity: 1; box-shadow: 0 1px 0 var(--line); }
.nav__side { display: flex; align-items: center; gap: 2.4rem; font: 400 .64rem/1 var(--thin); letter-spacing: .22em; text-transform: uppercase; }
.nav__side--right { justify-content: flex-end; }
.nav__side a:not(.pill), .footer__links a { position: relative; padding: .45rem 0; }
/* The link to the studio site's events work: a small thin arrow (drawn), a little softer */
.out-arrow { display: inline-block; width: .62em; height: .62em; margin-left: .45em; vertical-align: .05em; color: var(--soft); }
.out-arrow path { stroke-width: .8; }
.nav__side .out-arrow, .footer__links .out-arrow { width: .75em; height: .75em; margin-left: .55em; vertical-align: 0; }
.nav__side .out-arrow path, .footer__links .out-arrow path { stroke-width: .6; }
/* Medium screens: a little less room between the links and in the name, so both sides keep clear of it */
@media (max-width: 1240px) {
  .nav__side { gap: 1.6rem; }
  .nav__mark { letter-spacing: .22em; }
}
.nav__side a:not(.pill)::after, .footer__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right center; transition: transform .6s var(--ease-io); }
.nav__side a:not(.pill):hover::after, .nav__side a[aria-current]::after, .footer__links a:hover::after { transform: scaleX(1); transform-origin: left center; }
.nav .pill { padding: .85rem 1.35rem; }
.nav__mark { font: 400 clamp(.95rem, 1.4vw, 1.15rem)/1 var(--serif); letter-spacing: .26em; text-transform: uppercase; white-space: nowrap; }
.nav__toggle { display: none; justify-self: end; padding: .6rem 0; border: 0; background: none; font: 400 .64rem/1 var(--thin); letter-spacing: .22em; text-transform: uppercase; cursor: pointer; }
.nav__toggle span + span, .menu-open .nav__toggle span:first-child { display: none; }
.menu-open .nav__toggle span + span { display: inline; }
.menu { position: fixed; inset: 0; z-index: 19; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; background: var(--white); opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s; }
.menu a:not(.pill) { font: 300 clamp(1.7rem, 7.2vw, 2.35rem)/1.2 var(--serif); letter-spacing: .08em; text-transform: uppercase; }
.menu .pill { margin-top: 1.6rem; }
.menu p { margin: 2rem 0 0; font: italic 300 1.2rem/1.5 var(--italic); color: var(--soft); }
.menu > * { opacity: 0; translate: 0 14px; transition: opacity .6s ease, translate .9s var(--ease); }
.menu-open .menu { opacity: 1; visibility: visible; }
.menu-open .menu > * { opacity: 1; translate: none; }
.menu-open .menu > :nth-child(2) { transition-delay: .06s; }
.menu-open .menu > :nth-child(3) { transition-delay: .12s; }
.menu-open .menu > :nth-child(4) { transition-delay: .18s; }
.menu-open .menu > :nth-child(5) { transition-delay: .26s; }
.menu-open .nav { transform: none; opacity: 1; }
/* Pages without an opening photo: the menu is there from the start */
.has-nav main { padding-top: var(--nav-h); }

/* Titles split into lines: each line rises from behind a mask */
.line { display: block; overflow: hidden; padding: .18em .08em .14em; margin: -.18em -.08em -.14em; }
.line > span { display: inline-block; }

/* Home opening: full-screen photo, the name in large serif caps, a rule, the subtitle */
.hero { position: relative; height: 100vh; height: var(--screen); min-height: 560px; overflow: hidden; color: #fff; background: #3d3731; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(22, 18, 14, .5), rgba(22, 18, 14, 0) 50%); }
.hero__title { position: absolute; left: 0; right: 0; bottom: clamp(2.6rem, 9vh, 6rem); z-index: 1; padding: 0 16px; text-align: center; }
.hero h1 { margin: 0; font: 300 clamp(1.6rem, 4.4vw, 4.6rem)/.95 var(--serif); letter-spacing: .06em; text-transform: uppercase; }
.hero__rule { width: 52px; height: 1px; margin: clamp(1.2rem, 3vh, 1.8rem) auto; background: rgba(255, 255, 255, .8); }
.hero__sub { margin: 0; font: italic 400 clamp(1.05rem, 1.6vw, 1.35rem)/1.3 var(--italic); }

/* Opening: the photo settles, the name rises line by line, the rule draws, the subtitle appears */
@keyframes settle { from { scale: 1.08; } }
/* The opening photo then breathes: a slow zoom in and out, barely visible */
@keyframes breathe { to { scale: 1.05; } }
@keyframes rise { from { translate: 0 130%; } }
@keyframes draw { from { scale: 0 1; } }
@keyframes appear { from { opacity: 0; } }
.hero > img { animation: settle 3s var(--ease) both, breathe 18s ease-in-out 3s infinite alternate; }
.hero .line > span { animation: rise 1.5s var(--ease) .3s both; }
.hero .line:nth-child(2) > span { animation-delay: .45s; }
.hero__rule { animation: draw 1.4s var(--ease) .9s both; }
.hero__sub { animation: appear 1.6s ease 1.1s both; }

/* U triptych: three images, the middle one lower */
.triptych { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2.5rem, 5vw, 5rem) clamp(14px, 3vw, 44px); max-width: 1200px; margin: 0 auto; }
.triptych > :nth-child(3n + 2) { margin-top: clamp(0px, 7vw, 7rem); }
.card { display: block; margin: 0; }
.card__img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--stone); }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
/* Home triptych of the gallery: the 2:3 photos whole, feet included */
.triptych--whole .card__img { aspect-ratio: 2 / 3; }
a.card:hover .card__img img { transform: scale(1.03); }
.card h3 { margin: 1.3rem 0 0; font: 400 1.1rem/1.2 var(--serif); letter-spacing: .14em; text-transform: uppercase; }
.card p { margin: .45rem 0 0; font: 400 .62rem/1.6 var(--thin); letter-spacing: .24em; text-transform: uppercase; color: var(--soft); }

/* Gallery: uncropped photos in rows of one height that fill the width (each photo's
   width follows its ratio --r); the build ends the rows with .row-end, one set for
   large screens and one for phones. Each photo opens the viewer. */
.gallery { max-width: 1400px; margin: 0 auto; padding: 0 var(--gutter) clamp(5.5rem, 11vw, 9.5rem); --gap: clamp(8px, 1.1vw, 16px); --row-max: calc(100vh - var(--nav-h) - 4rem); --row-max: calc(100svh - var(--nav-h) - 4rem); }
/* A row never gets taller than the window under the menu: its photos stop at that
   height (width = height × ratio) and the row, narrower, is centred. */
.rows { display: flex; flex-wrap: wrap; justify-content: center; column-gap: var(--gap); }
/* × 10: a row whose grow factors add up to less than 1 would not fill the width */
.shot { flex: calc(var(--r) * 10) 1 0; min-width: 0; max-width: calc(var(--r) * var(--row-max)); margin-bottom: var(--gap); overflow: hidden; background: var(--stone); cursor: zoom-in; }
.shot img { width: 100%; height: auto; }
.row-end { flex-basis: 100%; height: 0; }
.row-end:not(.row-end--desk) { display: none; }
@media (hover: hover) {
  .shot:hover img { transform: scale(1.03); }
}

/* Viewer: the photo alone on white, the count and Close above, thin arrows on the sides */
.viewer { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(255, 255, 255, .985); color: var(--ink); }
.viewer[open] { display: grid; grid-template-rows: var(--nav-h) minmax(0, 1fr); animation: appear .5s ease both; }
.viewer::backdrop { background: rgba(255, 255, 255, .9); }
.viewer__bar { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); font: 400 .64rem/1 var(--thin); letter-spacing: .22em; text-transform: uppercase; }
.viewer__bar p { margin: 0; color: var(--soft); font-variant-numeric: tabular-nums; }
.viewer__close { padding: .6rem 0; border: 0; background: none; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.viewer__stage { display: flex; align-items: center; justify-content: center; min-height: 0; margin: 0; padding: 0 clamp(16px, 8vw, 128px) clamp(16px, 5vh, 56px); touch-action: pan-y; }
.viewer__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; opacity: 0; transition: opacity .45s ease; }
.viewer__stage img.is-loaded { opacity: 1; }
.viewer__nav { position: absolute; top: 50%; display: grid; place-items: center; width: 64px; height: 64px; margin-top: -32px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; }
.viewer__nav span { width: 16px; height: 16px; border-left: 1px solid currentColor; border-bottom: 1px solid currentColor; transition: translate .5s var(--ease); }
.viewer__nav--prev { left: clamp(0px, 2vw, 32px); }
.viewer__nav--prev span { rotate: 45deg; margin-left: 6px; }
.viewer__nav--next { right: clamp(0px, 2vw, 32px); }
.viewer__nav--next span { rotate: -135deg; margin-right: 6px; }
.viewer__nav--prev:hover span { translate: -4px 0; }
.viewer__nav--next:hover span { translate: 4px 0; }
.viewer-open { overflow: hidden; }

/* Wide on phones too (no near-square crop of a horizontal photo) */
.bleed { height: clamp(240px, 62vw, 860px); overflow: hidden; }
.bleed img { width: 100%; height: 100%; object-fit: cover; }
.wide { max-width: 1240px; margin: 0 auto; }
.wide img { width: 100%; height: auto; }

/* Image against the page edge, text beside it */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: center; padding-left: 0; }
.split figure { margin: 0; aspect-ratio: 4 / 5; max-height: 820px; overflow: hidden; }
/* Never taller than the window under the menu: on a small screen the portrait column
   narrows (the photo stays 4:5) and the text column takes the rest. */
.split { --split-figure: min(calc((100vh - var(--nav-h) - 3rem) * .8), 45vw); --split-figure: min(calc((100svh - var(--nav-h) - 3rem) * .8), 45vw); grid-template-columns: var(--split-figure) minmax(0, 1fr); }
.split figure img { width: 100%; height: 100%; object-fit: cover; }
.split .lede { margin-left: 0; }
.split--right { grid-template-columns: minmax(0, 1fr) var(--split-figure); padding-left: var(--gutter); padding-right: 0; }
.split--right > div { justify-self: end; }

.words blockquote { max-width: 24em; margin: 0 auto; font: italic 300 clamp(1.5rem, 2.8vw, 2.4rem)/1.38 var(--italic); text-wrap: balance; }
.words cite { display: block; margin-top: 1.8rem; font: 400 .64rem/1.5 var(--thin); font-style: normal; letter-spacing: .26em; text-transform: uppercase; color: var(--soft); }

/* Inquiry block: sentence title, oval buttons */
.inquire .lede { margin-bottom: 2.6rem; }
/* … inside an invitation card: champagne rule and an inner frame */
.invitation { position: relative; max-width: 980px; margin: 0 auto; padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.5rem, 6vw, 5rem); border: 1px solid #b39f80; background: var(--white); }
.invitation::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(179, 159, 128, .45); pointer-events: none; }

.footer { padding: clamp(4rem, 8vw, 6rem) var(--gutter) 2.2rem; text-align: center; border-top: 1px solid var(--line); }
.footer__mark { font: 400 clamp(1.05rem, 2vw, 1.45rem)/1.3 var(--serif); letter-spacing: .26em; text-transform: uppercase; }
.footer__line { margin: .9rem 0 0; font: italic 300 1.2rem/1.4 var(--italic); color: var(--soft); }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 2.4rem; margin: 2.2rem 0 0; font: 400 .62rem/1 var(--thin); letter-spacing: .24em; text-transform: uppercase; }
.footer__base { margin: 3rem 0 0; font-size: .74rem; color: var(--soft); }
.footer__base a { border-bottom: 1px solid var(--line); }

/* The Experience */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 4vw, 4rem); max-width: 1100px; margin: clamp(3rem, 6vw, 5rem) auto 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { padding-top: 1.4rem; border-top: 1px solid #d9d3c9; }
.steps li::before { content: counter(step, decimal-leading-zero); counter-increment: step; display: block; font: italic 300 2.2rem/1 var(--italic); color: var(--accent); }
.steps h3 { margin: 1.1rem 0 .5rem; font: 400 .7rem/1.5 var(--thin); letter-spacing: .24em; text-transform: uppercase; }
.steps p { margin: 0; color: var(--text); }
.included { margin: 2.4rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.included li { display: flex; align-items: baseline; gap: 1.2rem; padding: 1.05rem 0; border-bottom: 1px solid var(--line); font: 300 clamp(1.05rem, 1.45vw, 1.2rem)/1.4 var(--serif); }
.included small { margin-left: auto; font: 400 .6rem/1.6 var(--thin); letter-spacing: .22em; text-transform: uppercase; color: var(--soft); white-space: nowrap; }
.faq { max-width: 860px; margin: clamp(3rem, 6vw, 4.5rem) auto 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; padding: 1.5rem 0; list-style: none; cursor: pointer; font: 300 clamp(1.15rem, 1.8vw, 1.4rem)/1.35 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 200 1.6rem/1 var(--thin); color: var(--soft); transition: transform .5s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { max-width: 42em; margin: 0; padding: 0 0 1.7rem; color: var(--text); }
/* Answers open smoothly where the browser can animate the height */
@supports selector(::details-content) {
  .faq { interpolate-size: allow-keywords; }
  .faq details::details-content { height: 0; overflow: clip; transition: height .6s var(--ease), content-visibility .6s allow-discrete; }
  .faq details[open]::details-content { height: auto; }
}

/* About */
.about-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: center; min-height: calc(var(--screen) - var(--nav-h)); padding-right: var(--gutter); }
.about-head figure { align-self: stretch; margin: 0; min-height: 520px; overflow: hidden; }
/* At most the height of the window, even when the text beside it is longer */
.about-head figure { align-self: start; height: calc(100vh - var(--nav-h)); height: calc(100svh - var(--nav-h)); min-height: 0; max-height: 980px; }
.about-head figure img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; animation: settle 3s var(--ease) both; }
.about-head > div { padding: clamp(3rem, 6vw, 5rem) 0; }
.about-head .lede { margin-left: 0; }
.langs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; max-width: 1000px; margin: clamp(2.5rem, 5vw, 4rem) auto 0; }
.langs p { margin: 0; }
.langs__word { font: italic 300 clamp(2.2rem, 4.4vw, 3.8rem)/1.1 var(--italic); }
.langs .label { margin-top: 1rem; }
.vision { max-width: 20em; margin: 0 auto; font: italic 300 clamp(1.8rem, 3.6vw, 3.1rem)/1.3 var(--italic); text-wrap: balance; }
.credits { margin: 2.4rem 0 0; font: 400 .64rem/1.9 var(--thin); letter-spacing: .22em; text-transform: uppercase; color: var(--soft); }
.lede a { border-bottom: 1px solid var(--line); }

/* Inquire page: sticky photo on the left, form on the right */
.ask { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.ask__img { position: sticky; top: var(--nav-h); height: calc(var(--screen) - var(--nav-h)); min-height: 520px; margin: 0; overflow: hidden; }
.ask__img img { width: 100%; height: 100%; object-fit: cover; animation: settle 3s var(--ease) both; }
.ask__body { max-width: 760px; padding: clamp(4rem, 8vw, 7rem) var(--gutter) clamp(5rem, 9vw, 8rem) clamp(2.5rem, 6vw, 6rem); }
.ask__body .lede { margin-left: 0; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2rem 2.4rem; margin: 3.4rem 0 0; }
.field { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font: 400 .62rem/1.5 var(--thin); letter-spacing: .24em; text-transform: uppercase; color: var(--soft); transition: color .4s ease; }
.field:focus-within label { color: var(--ink); }
.field label i { font-style: normal; letter-spacing: .1em; text-transform: none; }
/* The field line fills from left to right while typing */
.field input, .field select, .field textarea { width: 100%; padding: .55rem 0 .7rem; border: 0; border-radius: 0; background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 100% / 0 1px, linear-gradient(#cfc8bd, #cfc8bd) no-repeat 0 100% / 100% 1px; font: 300 1.15rem/1.4 var(--serif); color: var(--ink); appearance: none; transition: background-size .7s var(--ease-io); }
.field input:focus, .field select:focus { outline: none; background-size: 100% 1px, 100% 1px; }
.field select { padding-right: 1.6rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2374706a'/%3E%3C/svg%3E") no-repeat right .2rem center, linear-gradient(var(--ink), var(--ink)) no-repeat 0 100% / 0 1px, linear-gradient(#cfc8bd, #cfc8bd) no-repeat 0 100% / 100% 1px; }
.field select:focus { background-size: auto, 100% 1px, 100% 1px; }
.field textarea { min-height: 10rem; margin-top: .4rem; padding: .9rem 1rem; border: 1px solid #cfc8bd; background: none; resize: vertical; transition: border-color .4s ease; }
.field textarea:focus { outline: none; border-color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: #a8a199; font-family: var(--italic); font-style: italic; }
.field small { font: italic 300 1.05rem/1.45 var(--italic); color: var(--soft); }
.form__send { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; }
.form__send p { margin: 0; font: italic 300 1.05rem/1.4 var(--italic); color: var(--soft); }
.thanks { margin-top: 3.4rem; animation: appear 1.2s ease both; }
.ask__other { margin-top: clamp(3.5rem, 7vw, 5rem); padding-top: 2.4rem; border-top: 1px solid var(--line); }
.ask__other .pills { justify-content: flex-start; }

/* Images fade in once loaded (except the main image of the page, shown at once) */
main img { transition: opacity 1.2s ease, scale 2.2s var(--ease), translate 1.8s var(--ease), clip-path 1.6s var(--ease-io), transform 1.6s var(--ease); }
.js img[data-fade]:not(.is-loaded) { opacity: 0; }
/* Failsafe when the script never runs (see the <head>) */
.reveal-all img[data-fade] { opacity: 1 !important; }

/* Reveals on scroll. Text blocks: each element rises and appears, one after the other */
.js-reveal [data-reveal]:not([data-reveal="img"]):not(section), .js-reveal section[data-reveal] > * { opacity: 0; translate: 0 24px; transition: opacity 1.2s var(--ease), translate 1.4s var(--ease); }
.js-reveal [data-reveal].is-in:not(section), .js-reveal section[data-reveal].is-in > * { opacity: 1; translate: none; }
.js-reveal section[data-reveal] > :nth-child(2) { transition-delay: .1s; }
.js-reveal section[data-reveal] > :nth-child(3) { transition-delay: .2s; }
.js-reveal section[data-reveal] > :nth-child(n + 4) { transition-delay: .3s; }
/* Images: three ways to appear depending on where the image sits, to vary the rhythm without overdoing it.
   1. Default (triptychs, gallery columns): fade, the image settles. */
[data-reveal="img"] { overflow: hidden; }
.js-reveal [data-reveal="img"]:not(.is-in) img { opacity: 0; scale: 1.06; }
/* 2. Wide photos: a shutter opens sideways and the image slides with it. */
.js-reveal :is(.wide, .shot--wide)[data-reveal]:not(.is-in) img { opacity: 1; scale: 1; clip-path: inset(0 100% 0 0); translate: -6% 0; }
/* 3. Single images (Alice's portrait, the home's wide photo): the frame opens from the centre. */
.js-reveal :is(.split figure, .bleed)[data-reveal]:not(.is-in) img { opacity: 0; scale: 1.1; translate: none; clip-path: inset(14% 18% 14% 18%); }
.js-reveal [data-reveal="img"].is-in img { scale: 1; translate: none; clip-path: inset(0 0 0 0); }
.js-reveal .card[data-reveal] :is(h3, p) { opacity: 0; transition: opacity 1s ease .6s; }
.js-reveal .card[data-reveal].is-in :is(h3, p) { opacity: 1; }
.js-reveal .triptych > :nth-child(3n + 2) img { transition-delay: .15s, .15s, .15s, .15s, 0s; }
.js-reveal .triptych > :nth-child(3n) img { transition-delay: .3s, .3s, .3s, .3s, 0s; }
/* Photos of a gallery row appear one after the other, left to right */
.js-reveal .shot img { --delay: calc(var(--place) * .12s); transition-delay: var(--delay), var(--delay), var(--delay), var(--delay), 0s; }
.js-reveal .steps > :nth-child(3n + 2), .js-reveal .langs > :nth-child(2) { transition-delay: .12s; }
.js-reveal .steps > :nth-child(3n), .js-reveal .langs > :nth-child(3) { transition-delay: .24s; }
/* Titles: the lines rise from behind their mask */
.js-reveal [data-lines] .line > span { translate: 0 130%; transition: translate 1.4s var(--ease); }
.js-reveal [data-lines].is-in .line > span { translate: none; }
.js-reveal [data-lines] .line:nth-child(2) > span { transition-delay: .12s; }
.js-reveal [data-lines] .line:nth-child(3) > span { transition-delay: .24s; }

/* Scrolling: the opening photo moves slower than the page, the home's wide photo drifts inside its frame.
   Scroll-driven animations, no JavaScript; browsers that do not know them simply skip them. */
@keyframes drift { to { translate: 0 16%; } }
@keyframes lift { to { opacity: 0; translate: 0 -48px; } }
@keyframes pan { from { translate: 0 -13%; } to { translate: 0 0; } }
@supports (animation-timeline: view()) {
  .hero { view-timeline: --opening block; }
  .hero > img { animation: settle 3s var(--ease) both, drift linear both, breathe 18s ease-in-out 3s infinite alternate; animation-timeline: auto, --opening, auto; animation-range: normal, exit, normal; }
  .hero__title { animation: lift linear both; animation-timeline: --opening; animation-range: exit 0% exit 70%; }
  .bleed { view-timeline: --bleed block; }
  .bleed img { height: 116%; animation: pan linear both; animation-timeline: --bleed; animation-range: cover; }
}

@media (max-width: 1080px) {
  :root { --nav-h: 68px; }
  .nav { grid-template-columns: 1fr auto; }
  .nav__side { display: none; }
  .nav__toggle { display: block; }
}
@media (max-width: 960px) {
  .split, .split--right { grid-template-columns: 1fr; padding-left: var(--gutter); padding-right: var(--gutter); }
  .split figure { max-width: 460px; }
  .split--right figure { order: -1; }
  .split--right > div { justify-self: start; }
  .about-head { grid-template-columns: 1fr; min-height: 0; padding: 0 var(--gutter); }
  .about-head figure { height: auto; max-height: none; min-height: 0; aspect-ratio: 4 / 5; margin: 0 calc(-1 * var(--gutter)); }
  .ask { grid-template-columns: 1fr; }
  .ask__img { position: static; height: auto; min-height: 0; aspect-ratio: 16 / 10; }
  .ask__body { padding-left: var(--gutter); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .nav__mark { font-size: .84rem; letter-spacing: .16em; }
  .triptych { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.4rem 10px; }
  .triptych > :nth-child(3n + 1) { grid-column: 1 / -1; }
  .triptych > :nth-child(3n + 2) { margin-top: 0; }
  .triptych > :nth-child(3n) { margin-top: 2.8rem; }
  .card h3 { font-size: 1rem; letter-spacing: .1em; }
  /* Shorter gallery rows on phones */
  .row-end:not(.row-end--phone) { display: none; }
  .row-end.row-end--phone { display: block; }
  .viewer__stage { padding: 0 0 72px; }
  .viewer__nav { top: auto; bottom: 4px; margin: 0; }
  .steps, .langs { grid-template-columns: 1fr; }
  .langs { gap: 2.4rem; }
  .form { grid-template-columns: 1fr; gap: 1.8rem; }
  .included li { flex-wrap: wrap; gap: .2rem 1rem; }
  .included small { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Inquiry form: trap field for bots, error message, sending state */
.form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__error { grid-column: 1 / -1; margin: 0; font: italic 300 1.1rem/1.5 var(--italic); color: #8a3e2f; }
.form button[disabled] { opacity: .6; cursor: progress; }
.form .cf-turnstile { grid-column: 1 / -1; }

/* Legal pages */
.legal { max-width: 46em; margin: 0 auto; }
.legal h2 { margin: 3rem 0 1rem; font: 400 .7rem/1.5 var(--thin); letter-spacing: .24em; text-transform: uppercase; }
.legal p, .legal li { color: var(--text); text-wrap: pretty; }
.legal p { margin: 0 0 1em; }
.legal ul { margin: 0 0 1em; padding-left: 1.2em; }

/* Small layout helpers of the page templates */
.wide--gutter { padding: 0 var(--gutter); }
.lede--spaced { margin: 0 auto clamp(3rem, 6vw, 4.5rem); }
.not-found__back { margin: 2.6rem 0 0; }
