/* Sarkis coming soon · Direction 1: The invitation
   Cream page, Fig type, Brick status, two supplied ingredient stamps and the olive hoarding tile row.
   Production package of the selected direction. */

@font-face {
  font-family: "Greenstone";
  src: url("../assets/Greenstone-Regular-Trial.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Montreal";
  src: url("../assets/NeueMontreal-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Alata";
  src: url("../assets/Alata-Regular%202.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette subset for this direction (extracted from the logo and social PDFs) */
  --cream: #FCF7E3;
  --fig: #592133;
  --brick: #A0412E;
  --olive: #7C7838;
  --saffron: #F2A103;

  /* Font roles */
  --font-display: "Greenstone", "Iowan Old Style", Georgia, serif;
  --font-text: "Neue Montreal", "Helvetica Neue", Arial, sans-serif;
  --font-identifier: "Alata", "Avenir Next", "Helvetica Neue", Arial, sans-serif;

  /* Type scale: headline is 50px at 390px and 88px at 1440px */
  --size-headline: clamp(46px, 35.9px + 3.62vw, 88px);
  --size-lede: 17px;
  --size-status: 14px;

  /* Spacing and measures */
  --gutter: 24px;
  --measure: 680px;
  --logo-width: 180px;
  --space-top: clamp(32px, 7vh, 64px);
  --space-logo-to-copy: clamp(28px, 6vh, 56px);
  --tile-height: 20px;
  --tile-gap-below: clamp(14px, 2.4vh, 24px);

  /* Stamps */
  --stamp-width: clamp(95px, 30vw, 120px);
  --stamp-shadow: drop-shadow(0 2px 3px rgb(89 33 51 / 0.16));

  --reveal-duration: 480ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--fig);
  font-family: var(--font-text);
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

::selection {
  background: var(--saffron);
  color: var(--fig);
}

:focus-visible {
  outline: 2px solid var(--fig);
  outline-offset: 3px;
}

/* Page frame: natural flow, at least one screen tall, scrolls when content needs it */
.page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.brand {
  display: flex;
  justify-content: center;
  padding: var(--space-top) var(--gutter) 0;
}

.brand img {
  width: var(--logo-width);
}

.invite {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-logo-to-copy) var(--gutter) 0;
  text-align: center;
}

.copy {
  width: 100%;
  max-width: var(--measure);
}

.status {
  margin: 0 0 clamp(14px, 2.4vh, 26px);
  color: var(--brick);
  font-family: var(--font-identifier);
  font-size: var(--size-status);
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

.headline {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--size-headline);
  font-weight: 400;
  font-style: normal;
  line-height: 1.04;
  letter-spacing: -0.005em;
}

.headline span {
  display: block;
}

.lede {
  margin: clamp(18px, 3vh, 30px) auto 0;
  font-size: var(--size-lede);
  line-height: 1.5;
}

.lede span {
  display: block;
}

/* Stamps: an intentional lower cluster on small screens */
.stamps {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-block: auto;
  padding: 36px 0 40px;
}

.stamp {
  width: var(--stamp-width);
  filter: var(--stamp-shadow);
}

.stamp--pomegranate {
  transform: rotate(-7deg);
}

.stamp--tomato {
  margin-left: calc(var(--stamp-width) * -0.12);
  transform: translateY(18%) rotate(6deg);
}

/* Lower border: the hoarding's irregular olive tile row */
.tiles {
  flex: none;
  height: var(--tile-height);
  margin-bottom: var(--tile-gap-below);
  background-color: var(--olive);
  -webkit-mask: url("../assets/tile-row.svg") repeat-x center / auto 100%;
  mask: url("../assets/tile-row.svg") repeat-x center / auto 100%;
}

@media (min-width: 600px) {
  :root {
    --gutter: 40px;
    --logo-width: 210px;
    --size-lede: 18px;
    --size-status: 15px;
    --stamp-width: 130px;
    --tile-height: 24px;
  }
}

/* Wide screens: the two stamps sit at opposing lower corners around the type */
@media (min-width: 1080px) {
  :root {
    --logo-width: 240px;
    --space-top: clamp(48px, 8.5vh, 96px);
    --space-logo-to-copy: clamp(32px, 7.5vh, 80px);
    --tile-height: 28px;
  }

  .invite {
    padding-bottom: clamp(140px, 24vh, 240px);
  }

  .stamps {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
  }

  .stamp {
    position: absolute;
    margin: 0;
  }

  .stamp--pomegranate {
    left: max(4vw, calc(50% - 480px));
    bottom: calc(var(--tile-height) + var(--tile-gap-below) + clamp(36px, 7vh, 88px));
    width: clamp(140px, 11.5vw, 175px);
  }

  .stamp--tomato {
    right: max(4vw, calc(50% - 470px));
    bottom: calc(var(--tile-height) + var(--tile-gap-below) + clamp(112px, 20vh, 210px));
    width: clamp(130px, 10.4vw, 160px);
    transform: rotate(6deg);
  }
}

/* Optional first-load reveal, under 600ms in total, never on reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: reveal var(--reveal-duration) cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .reveal--late {
    animation-delay: 60ms;
  }

  .reveal--last {
    animation-delay: 120ms;
  }

  @keyframes reveal {
    from {
      opacity: 0;
      transform: translateY(10px);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }
}
