/* Cindy & Thom — wedding website case study (own design, separate from the portfolio) */
:root {
  --ink: #18311D;
  --ink-2: #4B5E50;
  /* accent: burnt orange, the colour of the wedding theme (was mauve) */
  --mauve: #B04E16;
  --mauve-dark: #8E3D10;
  --mist: #E7EDF1;
  --peach: #F8EFE2;
  --orange: #B04E16;
  --line: #D3D3D3;
  --white: #FFFFFF;
  --font: 'Varela Round', 'Nunito', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.center { text-align: center; }
.h1 { font-size: clamp(40px, 5.4vw, 66px); line-height: 1.08; letter-spacing: -.01em; }
.h2 { font-size: clamp(34px, 4.2vw, 54px); line-height: 1.12; }
.lead { font-size: 19px; color: var(--ink-2); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--ink); color: #fff; padding: 10px 16px; }

/* bar back to the portfolio */
.case-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px 20px; flex-wrap: wrap; min-height: 62px; padding: 10px clamp(16px, 4vw, 40px); background: #0A0A0B; color: #4F6DE4; font: 700 16px/1.3 'Syne', system-ui, sans-serif; letter-spacing: .02em; }
.case-bar p { margin: 0; }
.case-bar a { color: #fff; text-decoration: none; }
.case-bar p a { color: #fff; }
.case-bar p a:hover { color: #B5CBFF; }
.case-bar a[href*="#works"] { padding: 10px 20px; border-radius: 12px; background: #2443B8; color: #fff; transition: filter .25s, transform .25s, box-shadow .25s; }
.case-bar a[href*="#works"]:hover { filter: brightness(1.2); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(36, 67, 184, .5); }

/* header */
.header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(24,49,29,.08); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.monogram { font-size: 22px; text-decoration: none; letter-spacing: .02em; }
.monogram span { color: var(--mauve); }
.nav { display: flex; align-items: center; gap: 30px; font-size: 15px; letter-spacing: .08em; }
.nav a { text-decoration: none; }
.nav a:not(.btn):hover { color: var(--mauve); }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.burger span, .burger span::before, .burger span::after { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); transition: transform .3s; content: ""; }
.burger span { top: 21px; } .burger span::before { top: -7px; left: 0; } .burger span::after { top: 7px; left: 0; }
.menu-open .burger span { background: transparent; }
.menu-open .burger span::before { transform: translateY(7px) rotate(45deg); }
.menu-open .burger span::after { transform: translateY(-7px) rotate(-45deg); }

/* button */
.btn { display: inline-flex; justify-content: center; align-items: center; min-width: 144px; padding: 14px 28px; background: var(--mauve); color: #fff; border: 0; font: 18px/1.4 var(--font); text-decoration: none; letter-spacing: .03em; cursor: pointer; transition: background .3s, transform .3s; }
.btn:hover { background: var(--ink); transform: translateY(-2px); }
.btn--small { min-width: 0; padding: 9px 20px; font-size: 15px; }
.note { margin-top: 14px; font-size: 15px; color: var(--ink-2); }

/* arch-shaped photo (the signature shape of this site) */
.arch { border-radius: 999px 999px 0 0; overflow: hidden; aspect-ratio: 2 / 3; }
.arch--full { border-radius: 999px; }
.arch img { width: 100%; height: 100%; object-fit: cover; }

/* hero */
.hero { background: var(--mist); padding: 70px 0 90px; }
.hero__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.hero .arch { max-width: 420px; border-radius: 6px; }
.hero__copy p.lead { margin: 26px 0 34px; max-width: 520px; }
.hero__copy .h1 em { font-style: normal; color: var(--mauve); }

/* rsvp & info */
.info { padding: 110px 0; }
.info__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.info__card { border: 1px solid var(--ink); padding: clamp(30px, 4vw, 56px); }
.info__card .lead { margin-top: 18px; padding-bottom: 28px; border-bottom: 1px solid var(--ink); }
.info__item { margin-top: 28px; }
.info__item h3 { font-size: 24px; }
.info__item p { margin-top: 6px; font-size: 16px; color: var(--ink-2); }
.info__item .accent { color: var(--orange); }
.info__card .btn { margin-top: 32px; }
.info .arch { max-width: 420px; justify-self: center; width: 100%; }

/* schedule */
.schedule { background: var(--mist); padding: 110px 0; }
.schedule .lead { margin-top: 14px; }
.schedule__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 60px; }
.slot { text-align: center; }
.slot__photo { border-radius: 8px; overflow: hidden; aspect-ratio: 3 / 4; margin-bottom: 20px; }
.slot__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.slot:hover .slot__photo img { transform: scale(1.06); }
.slot h3 { font-size: 23px; }
.slot__time { margin-top: 4px; color: var(--mauve); font-size: 17px; }
.slot p:last-child { margin-top: 10px; font-size: 15px; color: var(--ink-2); }

/* our story: short text on the left, photos you can flip through on the right — all in one screen */
.story { padding: 110px 0 170px; }
.story__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.story__kicker { margin-bottom: 14px; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; color: var(--mauve); }
.story__chapters { margin: 28px 0 32px; display: grid; gap: 18px; }
.story__chapters p { font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.story__num { display: block; margin-bottom: 4px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--mauve); }
.slider { position: relative; }
.slider__track { list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; border-radius: 8px; aspect-ratio: 4 / 5; max-height: 640px; }
.slider__track::-webkit-scrollbar { display: none; }
.slider__slide { flex: 0 0 100%; scroll-snap-align: center; }
.slider__open { display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in; background: var(--mist); }
.slider__open img { width: 100%; height: 100%; object-fit: cover; }
.slider__open:focus-visible { outline: 3px solid var(--mauve); outline-offset: -3px; }
.slider__bar { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 16px; }
.slider__nav { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--ink); background: transparent; color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; transition: background .25s, color .25s; }
.slider__nav:hover { background: var(--mauve); border-color: var(--mauve); color: #fff; }
.slider__nav:focus-visible { outline: 3px solid var(--mauve); outline-offset: 3px; }
.slider__count { min-width: 60px; text-align: center; font-size: 15px; letter-spacing: .1em; color: var(--ink-2); }

/* photo viewer */
.viewer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(12, 18, 14, .92); padding: 60px 70px; animation: viewerIn .3s ease both; }
.viewer[hidden] { display: none; }
@keyframes viewerIn { from { opacity: 0; } to { opacity: 1; } }
.viewer__img { max-width: min(900px, 100%); max-height: 82vh; object-fit: contain; border: 8px solid #fff; border-bottom-width: 40px; box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: photoIn .35s cubic-bezier(.2,.8,.2,1) both; }
@keyframes photoIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.viewer__close, .viewer__nav { position: absolute; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; transition: background .25s; }
.viewer__close:hover, .viewer__nav:hover { background: rgba(255,255,255,.28); }
.viewer__close:focus-visible, .viewer__nav:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.viewer__close { top: 18px; right: 18px; width: 48px; height: 48px; font-size: 30px; line-height: 1; }
.viewer__nav { top: 50%; width: 52px; height: 52px; margin-top: -26px; font-size: 34px; line-height: 1; }
.viewer__nav--prev { left: 14px; } .viewer__nav--next { right: 14px; }
.viewer__count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.8); font-size: 14px; letter-spacing: .1em; }
@media (max-width: 760px) { .viewer { padding: 60px 12px; } .viewer__nav { top: auto; bottom: 10px; margin: 0; } .viewer__nav--prev { left: 20px; } .viewer__nav--next { right: 20px; } }

/* RSVP & Info photo: starts zoomed in, zooms out as you scroll to it (set in wedding.js) */
.info .arch img { transform: scale(var(--zoom, 1)); transform-origin: 50% 55%; will-change: transform; }

/* faq */
.faq { padding: 40px 0 110px; }
.faq__grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 60px; align-items: start; }
.faq__list { display: grid; gap: 14px; }
.faq details { background: var(--peach); border-radius: 16px; padding: 20px 26px; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 19px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border: 1.5px solid var(--ink); border-radius: 50%; font-size: 18px; line-height: 1; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 14px; font-size: 16px; color: var(--ink-2); }

/* rsvp form */
.rsvp { background: var(--mist); padding: 110px 0; }
.rsvp__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; align-items: start; }
.rsvp .lead { margin-top: 16px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form label { display: grid; gap: 8px; font-size: 15px; }
.form input, .form select, .form textarea { font: 16px var(--font); color: var(--ink); background: #fff; border: 1px solid #CDDAD0; border-radius: 8px; padding: 12px 14px; min-height: 48px; transition: border-color .3s; }
.form textarea { min-height: 140px; resize: vertical; }
.form :is(input, select, textarea):focus { outline: none; border-color: var(--mauve); }
.form__full { grid-column: 1 / -1; }
.form .btn { justify-self: start; }
.form__ok { grid-column: 1 / -1; padding: 16px 20px; background: #fff; border-left: 3px solid var(--mauve); }

/* footer */
.footer { padding: 70px 0 30px; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; }
.footer__name { font-size: 24px; }
.footer__about { margin-top: 12px; max-width: 420px; font-size: 15px; color: var(--ink-2); }
.footer__links { list-style: none; margin: 0; padding: 0; display: grid; justify-items: end; gap: 12px; letter-spacing: 2px; font-size: 18px; }
.footer__links a { text-decoration: none; transition: color .3s; }
.footer__links a:hover { color: var(--mauve); }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 50px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }

/* ===== story page ===== */
.story-hero { padding: 70px 0 90px; }
.story-hero .h1 { color: var(--ink); }
.story-hero .lead { margin-top: 26px; max-width: 480px; }
.chapter { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 100px); align-items: center; padding: 50px 0; }
.chapter--flip .chapter__photo { order: 2; }
.chapter__photo { border-radius: 8px; overflow: hidden; aspect-ratio: 1; }
.chapter__photo img { width: 100%; height: 100%; object-fit: cover; }
.chapter__text p { font-size: 20px; line-height: 1.6; }
.chapter__text p + p { margin-top: 16px; }
.chapter__num { display: block; margin-bottom: 14px; font-size: 15px; letter-spacing: .14em; color: var(--mauve); }
.story-end { background: var(--mist); padding: 100px 0; margin-top: 60px; }
.story-end p { max-width: 640px; margin: 0 auto 34px; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.45; }

/* scroll animations */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(32px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .slot.reveal { transform: translateY(70px); transition-duration: 1.4s; }
  .js .slot.reveal.is-in { transform: none; }
  .js .arch.reveal { transform: translateY(32px) scale(.96); }
  .js .arch.reveal.is-in { transform: none; }
  .js .hero .arch img { animation: slowZoom 12s ease-out both; }
  @keyframes slowZoom { from { transform: scale(1.1); } to { transform: none; } }
}

/* responsive */
@media (max-width: 960px) {
  .schedule__grid { grid-template-columns: 1fr 1fr; }
  .faq__grid, .rsvp__grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 760px) {
  .burger { display: block; }
  .nav { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; padding: 8px 20px 24px; box-shadow: 0 20px 30px rgba(0,0,0,.06); display: none; }
  .nav a { padding: 14px 0; border-bottom: 1px solid rgba(0,0,0,.06); }
  .nav .btn { margin-top: 16px; border: 0; }
  .menu-open .nav { display: flex; }
  .hero__grid, .info__grid, .chapter { grid-template-columns: 1fr; }
  .hero .arch { max-width: 300px; margin-inline: auto; }
  .info .arch { max-width: 300px; order: -1; }
  .form { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__links { justify-items: start; }
  .chapter--flip .chapter__photo { order: 0; }
  .info, .schedule, .rsvp { padding: 80px 0; }
  .story { padding: 80px 0 120px; }
  .story__grid { grid-template-columns: 1fr; }
}

/* the "Concept project" bar stays on top; the site menu below it hides while you scroll down
   and comes back when you scroll up or move the mouse to the top of the screen */
.case-bar { position: sticky; top: 0; z-index: 40; }
.header { top: var(--bar-h, 52px); transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.header.is-hidden { transform: translateY(-100%); }
@media (max-width: 760px) {
  .case-bar { min-height: 52px; padding: 6px 12px; font-size: 12px; flex-wrap: nowrap; gap: 10px; }
  .case-bar p, .case-bar a { white-space: nowrap; }
  .case-bar a[href*="#works"] { padding: 8px 12px; border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) { .header { transition: none; } }

/* ---------- phone fine-tuning ---------- */
@media (max-width: 760px) {
  /* first screen order: heading, text, photo, RSVP button */
  .hero { padding: 40px 0 60px; }
  .hero__grid { gap: 22px; }
  .hero__copy { display: contents; }
  .hero__copy .h1 { order: 1; }
  .hero__copy .lead { order: 2; margin: 0; }
  .hero .arch { order: 3; max-width: 320px; width: 100%; margin: 8px auto 0; }
  .hero__cta { order: 4; text-align: center; }
  .hero__cta .btn { min-width: 200px; }

  /* schedule: one photo per row, caption under it */
  .schedule__grid { grid-template-columns: minmax(0, 1fr); gap: 44px; max-width: 420px; margin-inline: auto; }

  /* less empty space between Our Story and FAQ */
  .story { padding: 70px 0 56px; }
  .faq { padding-top: 0; }
}

@media (max-width: 400px) { .case-bar__long { display: none; } }

/* Our Story → FAQ: smaller gap between the two sections */
.story { padding-bottom: 90px; }
@media (max-width: 760px) { .story { padding-bottom: 56px; } }

/* ---------- phone turned sideways (low screen): everything a size smaller ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  .case-bar, .header { position: relative; top: 0; }
  .case-bar { min-height: 48px; font-size: 14px; }
  .hero { padding: 32px 0 48px; }
  .hero .arch { max-width: 260px; }
  .info, .schedule, .rsvp { padding: 56px 0; }
  .story { padding: 56px 0 48px; }
  .faq { padding: 24px 0 56px; }
  .schedule__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
  .story__grid { align-items: start; }
  .story__chapters { margin: 18px 0 22px; gap: 12px; }
  .story__chapters p { font-size: 15px; }
}

/* ==========================================================================
   v26 — Schedule: vertical photos, titles / times / texts on one line in every row
   ========================================================================== */
.schedule__grid { row-gap: 0; }
@supports (grid-template-rows: subgrid) {
  .slot { display: grid; grid-row: span 4; grid-template-rows: subgrid; align-content: start; }
}
.slot { padding-bottom: 40px; }
.slot__photo { aspect-ratio: 3 / 4; }
.slot h3 { align-self: end; }
@media (orientation: landscape) and (max-height: 520px) {
  .schedule__grid { column-gap: 16px; margin-top: 32px; }
  .slot { padding-bottom: 24px; }
  .slot__photo { margin-bottom: 12px; }
  .slot h3 { font-size: 18px; }
  .slot__time { font-size: 15px; }
  .slot p:last-child { margin-top: 6px; font-size: 13.5px; line-height: 1.5; }
}

/* ==========================================================================
   v26 — Our Story: big photo next to the text, no empty space
   ========================================================================== */
/* one column (phones upright, small tablets upright): the photo is large and centred */
@media (max-width: 760px) and (orientation: portrait) {
  .slider { width: 100%; max-width: 480px; margin-inline: auto; }
  .slider__track { aspect-ratio: 4 / 5; max-height: none; }
}
/* phones turned sideways: text on the left, the photo on the right stays beside you while you read */
@media (orientation: landscape) and (max-height: 520px) {
  .story__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 32px; align-items: start; }
  .slider { position: sticky; top: 14px; }
  .slider__track { aspect-ratio: auto; height: calc(100svh - 92px); width: min(100%, calc((100svh - 92px) * .8)); max-height: none; margin-inline: auto; }
  .slider__bar { margin-top: 10px; }
  .slider__nav { width: 40px; height: 40px; font-size: 22px; }
}
@media (orientation: landscape) and (max-height: 520px) and (max-width: 760px) {
  .schedule__grid { column-gap: 12px; }
  .slot h3 { font-size: 16px; }
  .slot p:last-child { font-size: 12.5px; }
}

/* Our Story, phone turned sideways: the photo is almost as tall as the screen,
   arrows and the counter sit on the bottom of the photo */
@media (orientation: landscape) and (max-height: 520px) {
  .slider { top: 10px; }
  .slider__track { height: calc(100svh - 20px); width: min(100%, calc((100svh - 20px) * .8)); }
  .slider__bar { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); margin: 0; gap: 12px; padding: 5px 8px; border-radius: 999px; background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .slider__nav { width: 34px; height: 34px; font-size: 20px; }
  .slider__count { min-width: 44px; font-size: 13px; }
}
