/* Dra. Marjorie Díaz — base: tokens, type, frame, nav, buttons, intro, footer */

:root {
  --ivory: #f6f1eb;
  --white: #ffffff;
  --sand: #ebe1d2;
  --sand-deep: #dccdb6;
  --gold: #b08a45;
  --gold-ink: #7e5f25;
  --gold-light: #d9c08e;
  --gold-display: #94703a;
  --purple: #410963;
  --purple-press: #33074e;
  --ink: #2a1d30;
  --muted: #5e5163;
  --plum: #24102f;
  --plum-soft: #3b1a4e;
  --on-plum: #f7f2ea;
  --on-plum-muted: #cdbfd3;

  --display: "Gilda Display", "Didot", "Bodoni 72", Georgia, serif;
  --text: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;

  /* The whole page uses these six sizes, and they grow on large screens */
  --t-display: clamp(42px, 6.6vw, 104px);
  --t-h2: clamp(34px, 4.2vw, 64px);
  --t-h3: clamp(24px, 2.2vw, 34px);
  --t-lede: clamp(19px, 1.5vw, 24px);
  --t-body: clamp(17px, 0.4vw + 13px, 21px);
  --t-small: 15px;

  /* Page margin; on very wide screens it grows so content stays within ~1520px */
  --m: max(clamp(20px, 4.4vw, 64px), calc((100vw - 1520px) / 2));
  --gap: clamp(12px, 1.7vw, 24px);
  --section: clamp(112px, 14vw, 220px);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--t-body);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--purple); color: var(--ivory); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
html { scrollbar-color: var(--sand-deep) var(--ivory); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--purple);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--t-display); line-height: 0.98; letter-spacing: -0.025em; }
h2 { font-size: var(--t-h2); line-height: 1.02; letter-spacing: -0.015em; }
h3 { font-size: var(--t-h3); line-height: 1.12; letter-spacing: -0.005em; }
p { margin: 0; text-wrap: pretty; }
/* Every control answers the touch at once: no double-tap delay */
a, button, label, summary { touch-action: manipulation; }
.lede { font-size: var(--t-lede); line-height: 1.45; max-width: 34ch; }
.small { font-size: var(--t-small); color: var(--muted); letter-spacing: 0.01em; }

.wrap { padding-inline: var(--m); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

.skip {
  position: absolute; left: var(--m); top: -60px; z-index: 100;
  background: var(--purple); color: var(--ivory); padding: 10px 16px; border-radius: 999px;
}
.skip:focus { top: 12px; }

/* Prints: square-cornered photographs */
.print { position: relative; overflow: hidden; background: var(--sand); margin: 0; }
.print img { width: 100%; height: 100%; object-fit: cover; }
.r-45 { aspect-ratio: 4 / 5; }
.r-34 { aspect-ratio: 3 / 4; }
.r-11 { aspect-ratio: 1 / 1; }
.r-1610 { aspect-ratio: 16 / 10; }
.r-58 { aspect-ratio: 5 / 8; }
/* Cut-out photographs sit on a field of the brand's own colour instead of the grey studio backdrop */
.print--sand { background: var(--sand); }
.print--plum { background: var(--plum-soft); }
.js [data-unveil].print--sand { background: var(--sand); }
/* The logo's pill oval, with its thin gold ring */
.print.oval { border-radius: 999px; outline: 1.5px solid var(--gold); outline-offset: 6px; } /* taste-skill-ignore: the gold ring of the logo oval */
.print.oval img { object-position: 50% 24%; }
figcaption { font-size: var(--t-small); color: var(--muted); margin-top: 10px; }

/* Buttons: one shape, the pill of the logo's oval */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  background: var(--purple); color: var(--ivory);
  border: 0; border-radius: 999px;
  font-family: var(--text); font-size: var(--t-body); font-weight: 500; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--quiet { background: transparent; color: var(--purple); box-shadow: inset 0 0 0 1.5px var(--purple); } /* taste-skill-ignore: outline ring of the quiet button, not a shadow */
.btn--light { background: var(--ivory); color: var(--purple); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--purple-press); }
  .btn--quiet:hover { background: var(--purple); color: var(--ivory); }
  .btn--light:hover { background: var(--white); }
}

.link {
  color: var(--purple); text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 0.22em; text-decoration-color: color-mix(in srgb, var(--gold) 70%, transparent);
  transition: text-decoration-color 200ms ease;
}
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration-color: var(--purple); } }

/* Navigation */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--m);
  transition: background-color 300ms ease, transform 400ms var(--ease-out);
}
.nav.is-scrolled { background: color-mix(in srgb, var(--ivory) 94%, transparent); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--purple); }
.nav__brand img { width: 18px; height: auto; }
.nav__brand span { font-family: var(--display); font-size: var(--t-lede); line-height: 1; }
.nav__links { display: flex; gap: clamp(18px, 2.4vw, 36px); align-items: center; }
.nav__links a:not(.btn) {
  position: relative; text-decoration: none; font-size: var(--t-small); color: var(--ink); padding-block: 4px;
}
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; /* taste-skill-ignore: hover underline of a nav link */
  transform: scaleX(0); transform-origin: left; transition: transform 300ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .nav__links a:not(.btn):hover::after { transform: scaleX(1); } }
.nav__links a[aria-current="page"] { color: var(--purple); }
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav .btn { min-height: 44px; padding: 0 20px; font-size: var(--t-small); }
.nav__menu { display: none; }

@media (max-width: 1180px) {
  .nav { padding: 12px var(--m); }
  .nav__links { justify-content: flex-start; padding-top: max(96px, 12svh); }
  .nav__links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 22px;
    padding: 96px var(--m) 48px; background: var(--ivory);
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path 500ms var(--ease-drawer), visibility 0s linear 500ms;
  }
  .nav__links { overflow-y: auto; gap: 14px; }
  .nav__links a:not(.btn) { font-family: var(--display); font-size: clamp(30px, 7vw, 44px); color: var(--purple); line-height: 1.1; }
  .nav__links .btn { margin-top: 18px; min-height: 52px; font-size: var(--t-body); }
  .nav.is-open .nav__links { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 500ms var(--ease-drawer), visibility 0s; }
  .nav.is-open { background: var(--ivory); }
  .nav__menu {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
    background: none; border: 0; font-size: var(--t-body); font-weight: 500; color: var(--purple); cursor: pointer;
  }
}

/* Intro: the logo is drawn */
.intro {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: var(--ivory);
  clip-path: inset(0 0 0 0);
}
.intro__lockup { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: clamp(18px, 3vh, 30px); width: min(84vw, 560px); }
.intro__oval { position: relative; width: clamp(92px, 13vw, 132px); aspect-ratio: 197 / 338; }
.intro__oval svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.intro__oval rect { fill: none; stroke: var(--gold); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.intro__oval img { position: absolute; left: 50%; top: 50%; width: 66%; transform: translate(-50%, -50%); }
.intro__firma { width: 100%; }
.intro__tag { display: flex; align-items: center; gap: 14px; font-size: var(--t-small); color: var(--purple); letter-spacing: 0.02em; white-space: nowrap; }
.intro__tag::before, .intro__tag::after { content: ""; width: clamp(28px, 6vw, 70px); height: 1px; background: var(--gold); } /* taste-skill-ignore: the gold rules of the logo lockup */
.intro__skip {
  position: absolute; right: var(--m); bottom: 24px;
  background: none; border: 0; color: var(--muted); font-size: var(--t-small); cursor: pointer; min-height: 44px;
}
.intro.is-done { display: none; }
html.no-intro .intro { display: none; }

/* Reveal: content is visible unless the script opts it in */
.js [data-reveal] { opacity: 0; transform: translateY(24px); }
.js [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity 900ms var(--ease-out), transform 1100ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js [data-unveil] { background: transparent; }
.js [data-unveil] img { clip-path: inset(0 0 100% 0); transform: scale(1.12); }
.js [data-unveil].is-in img {
  clip-path: inset(0 0 0 0); transform: scale(1);
  transition: clip-path 900ms var(--ease-in-out), transform 1500ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
/* Phones: photographs rise and fade instead of being clipped open (clip-path repaints every frame on many phones) */
@media (hover: none), (max-width: 860px) {
  .js [data-unveil] img, .js [data-unveil].is-in img { clip-path: none; transform: none; transition: none; }
  .js [data-unveil] { opacity: 0; transform: translateY(24px); }
  .js [data-unveil].is-in {
    opacity: 1; transform: none;
    transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out); transition-delay: var(--d, 0ms);
  }
}
@media (prefers-contrast: more) {
  :root { --muted: var(--ink); --gold: var(--gold-ink); }
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-unveil] { opacity: 1; transform: none; }
  .js [data-unveil] img { transform: none; clip-path: none; }
}

/* Floating WhatsApp button (phones) */
.wa-float {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 35;
  display: none; width: 58px; height: 58px; border-radius: 999px;
  background: var(--purple); color: var(--ivory); place-items: center;

  transition: transform 160ms var(--ease-out), opacity 300ms ease;
}
.wa-float svg { width: 26px; height: 26px; }
.wa-float:active { transform: scale(0.94); }
.wa-float.is-away { opacity: 0; pointer-events: none; transform: translateY(12px); }
@media (max-width: 860px) { .wa-float { display: grid; } }

/* Footer: photograph half, menu half */
.footer { display: grid; grid-template-columns: 1fr 1fr; min-height: 100svh; background: var(--plum); color: var(--on-plum); }
.footer__photo { position: relative; overflow: hidden; }
.footer__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.footer__body { display: flex; flex-direction: column; padding: 72px var(--m) 32px clamp(32px, 5vw, 96px); gap: 56px; }
.footer__firma { width: min(100%, 420px); }
.footer__menu { display: grid; gap: 14px; }
.footer__menu a {
  font-family: var(--display); font-size: var(--t-h3); line-height: 1.1;
  color: var(--on-plum); text-decoration: none; width: fit-content;
  transition: transform 300ms var(--ease-out), color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .footer__menu:hover a { color: var(--on-plum-muted); }
  .footer__menu a:hover { color: var(--gold-light); transform: translateX(12px); }
}
.footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; font-size: var(--t-body); }
.footer__label { font-size: var(--t-small); font-weight: 500; color: var(--gold-light); margin-bottom: 8px; }
.footer__cols a { color: var(--on-plum); text-decoration-color: color-mix(in srgb, var(--gold-light) 60%, transparent); text-underline-offset: 0.22em; }
.footer__legal { margin-top: auto; font-size: var(--t-small); color: var(--on-plum-muted); }
@media (max-width: 860px) {
  .footer { grid-template-columns: 1fr; min-height: 0; }
  .footer__photo { height: 56svh; }
  .footer__body { padding: 48px var(--m) calc(96px + env(safe-area-inset-bottom)); gap: 40px; }
  .footer__menu a { font-size: var(--t-h3); }
  .footer__cols { grid-template-columns: 1fr; }
}

/* Doors open into their page: cross-document view transition */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 450ms; }
::view-transition-group(door-pedi), ::view-transition-group(door-este) { animation-duration: 800ms; animation-timing-function: cubic-bezier(0.77, 0, 0.175, 1); }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ---------- Phones: an app-like finish ---------- */
html { overscroll-behavior-y: none; }
.rows__list, .steps__list { display: contents; }

/* The booking bar: a pill pinned to the bottom once the hero is gone */
.wa-float span { display: none; }
@media (max-width: 860px) {
  .wa-float {
    left: 50%; right: auto; width: min(calc(100% - 32px), 420px); height: 56px; transform: translateX(-50%);
    display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px;
    font-size: var(--t-body); font-weight: 500; text-decoration: none;
    transition: transform 400ms var(--ease-out), opacity 300ms ease;
  }
  .wa-float span { display: inline; }
  .wa-float svg { width: 22px; height: 22px; }
  .wa-float:active { transform: translateX(-50%) scale(0.97); }
  .wa-float.is-away { transform: translate(-50%, calc(100% + 32px)); opacity: 0; }
  main { padding-bottom: 8px; }
}

/* Swipeable rows of cards: one card and a peek of the next */
@media (max-width: 860px) {
  [data-carousel] {
    display: flex !important; flex-direction: row !important; gap: 14px !important;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--m) * -1); padding: 4px var(--m) 8px !important;
    scroll-padding-inline: var(--m); scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  [data-carousel]::-webkit-scrollbar { display: none; }
  [data-carousel] > * {
    flex: 0 0 80%; min-width: 0; max-width: 80%; width: auto !important; margin: 0 !important; scroll-snap-align: center;
    grid-template-columns: minmax(0, 1fr) !important;
    background: var(--white); border-radius: 24px; padding: 12px 12px 22px; text-align: center;
    display: grid; align-content: start; justify-items: center; gap: 10px;
  }
  [data-carousel] > * > .print { width: 100% !important; border-radius: 16px; order: -1; margin: 0; aspect-ratio: 4 / 5; }
  [data-carousel] > * > .print img { object-position: 50% 18%; }
  [data-carousel] > * h3 { margin-top: 6px; }
  [data-carousel] > * p { padding-inline: 6px; margin: 0; max-width: none; }
  /* Cards off to the side are already there: never wait for a reveal */
  .js [data-carousel] [data-reveal], .js [data-carousel] [data-unveil], .js [data-carousel] > [data-reveal] { opacity: 1; transform: none; }
  .carousel-dots { margin-top: 18px; }
}
.carousel-dots { display: none; justify-content: center; align-items: center; gap: 8px; }
.carousel-dots span { width: 7px; height: 7px; border-radius: 999px; background: var(--sand-deep); transition: width 300ms var(--ease-out), background-color 300ms ease; }
.carousel-dots span.is-on { width: 22px; background: var(--purple); }
/* Arrows only where there is a mouse and room (see door.css) */
.carousel-arrow {
  display: none; place-items: center; width: 44px; height: 44px; margin-inline: 10px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--purple); box-shadow: inset 0 0 0 1.5px var(--purple); cursor: pointer; /* taste-skill-ignore: outline ring, not a shadow */
  transition: background-color 200ms ease, color 200ms ease, opacity 200ms ease, transform 160ms var(--ease-out);
}
.carousel-arrow svg { width: 18px; height: 18px; }
.carousel-arrow[data-dir="-1"] svg { transform: rotate(180deg); }
.carousel-arrow:active { transform: scale(0.94); }
.carousel-arrow:disabled { opacity: 0.3; cursor: default; }
@media (hover: hover) and (pointer: fine) { .carousel-arrow:not(:disabled):hover { background: var(--purple); color: var(--ivory); } }
@media (max-width: 860px) {
  .carousel-dots { display: flex; }
  .rows__list, .steps__list { grid-column: 1 / 13; align-self: stretch; width: auto; }
  .steps .carousel-dots, .rows .carousel-dots { grid-column: 1 / 13; align-self: center; }
  .roles .carousel-dots { grid-column: 1 / 13; }
  .footer__photo { height: 38svh; }
}

/* Phones: the intro tagline wraps under the signature instead of pushing the lockup off-centre */
@media (max-width: 600px) {
  .intro__tag { white-space: normal; text-align: center; max-width: 30ch; line-height: 1.4; }
  .intro__tag::before, .intro__tag::after { display: none; }
}
