/* ==========================================================================
   REVAE — site styles (Brand Identity V2, Route 1, Option A)
   1. Tokens   2. Fonts   3. Base   4. Launch page (phone first, poster from 900px)
   5. Sign-up bar   6. Document pages (privacy, 404)   7. Motion
   ========================================================================== */

/* 1. Tokens ------------------------------------------------------------- */
:root {
  --ink: #23221e;      /* identity near-black */
  --paper: #fbfaf5;
  --butter: #f8d998;   /* butter as applied in the identity's web and print mocks */
  --gold: #e2c880;
  --stone: #ebe3d9;    /* warm grey */
  --cream: #f8e8c9;
  --muted: #6b675f;
  --ease-out: cubic-bezier(.23, 1, .32, 1);

  /* Option A: Brown Pro + Cormorant Garamond. DM Sans stands in for Brown Pro (licensed face);
     drop the Brown Pro woff2 into assets/fonts and point --font-sans at it. */
  --font-sans: "DM Sans", Arial, sans-serif;
  --font-serif: "Cormorant Garamond", Garamond, Georgia, serif;
}

/* 2. Fonts (self-hosted latin subsets) ---------------------------------- */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/dm-sans.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 3. Base ---------------------------------------------------------------- */
*, ::before, ::after { box-sizing: border-box; }

html {
  background: var(--paper);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
}

h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 600; }

button, input {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
button { padding: 0; border: 0; background: none; cursor: pointer; }
input { border: 0; border-radius: 0; background: none; }

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.eyebrow {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Brand: the wordmark everywhere; the icon only stands in on the narrowest document headers */
.brand { display: inline-flex; align-items: center; justify-content: center; }
.brand-wordmark { height: 40px; width: auto; }
.brand-icon { display: none; height: 40px; width: auto; }

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 32px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 500;
  transition: background .18s var(--ease-out), color .18s var(--ease-out), transform .15s var(--ease-out);
}
.cta-button:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.cta-button:active { transform: scale(.97); }

/* 4. Launch page --------------------------------------------------------- */
/* Phone first: the identity deck's mobile page. The photo card takes whatever height is
   left after the copy and the form, so the whole page fits the screen. */
.launch {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--butter);
}

.launch-head { position: relative; flex: none; height: 96px; }
.launch-head .brand { position: absolute; left: 16px; top: 24px; }
.launch .brand-wordmark { width: 100px; height: auto; }

.launch-mark {
  position: absolute;
  z-index: 2;
  top: 24px;
  right: 16px;
  height: 196px;
  pointer-events: none;
}
.launch-mark img { width: auto; height: 100%; }

.launch-card {
  position: relative;
  flex: 1 1 0;
  min-height: 220px;
  margin: 0 16px;
  overflow: hidden;
  border-radius: 18px;
}
.launch-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.launch-main { display: flex; flex-direction: column; flex: none; }
.launch-copy { padding: 24px 20px 0; text-align: center; }
.launch-copy h1 {
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.02em;
}
.launch-copy h1 em { font-style: italic; font-weight: 500; }
.launch-desc {
  max-width: 34ch;
  margin: 14px auto 0;
  color: #3a3833;
  font-size: 14px;
  line-height: 1.45;
}
@media (min-width: 600px) and (max-width: 899px) {
  .launch .brand-wordmark { width: 120px; }
  .launch-mark { height: 260px; }
  .launch-copy h1 { font-size: 60px; }
  .launch-desc { font-size: 16px; }
}

/* The poster from 900px up: wordmark top-left, the copy centred in the height on the left,
   the R running from the top bar to the sign-up bar on the right. */
@media (min-width: 900px) {
  .launch-head { height: auto; padding: 34px 48px 0; }
  .launch-head .brand { position: static; }
  .launch .brand-wordmark { width: 132px; }
  .launch-card { display: none; }

  .launch-main {
    position: relative;
    flex: 1;
    padding: 0 48px;
  }
  .launch-copy { margin: auto 0; padding: 0; text-align: left; }
  .launch-copy h1 {
    margin-left: -4px;
    font-size: clamp(72px, min(10.4vw, 16.7vh), 150px);
    line-height: .84;
    letter-spacing: -.03em;
  }
  .launch-desc { max-width: 36ch; margin: 24px 0 0; font-size: 17px; }

  /* A 36vw box from the top bar to the sign-up bar; the R fits inside it anchored right and bottom,
     so it spans the full height on wide screens and shrinks from the top on narrow ones. */
  .launch-mark {
    top: 10px;
    right: -56px;
    bottom: 0;
    width: 36vw;
    height: auto;
  }
  .launch-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right bottom;
  }
}

/* 5. Sign-up ------------------------------------------------------------- */
/* Phones: a single button in the black bar opens a bottom sheet with the form.
   Desktop: the form sits inline in the bar. One <dialog> serves both: opened non-modally it is a
   plain block in the bar; opened with showModal() it is the sheet. Without JavaScript the dialog
   stays open inline at every size. */
.signup {
  flex: none;
  margin-top: 24px;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  background: var(--ink);
  color: var(--paper);
}
.signup-lead { display: none; font-size: 14px; font-weight: 500; }
.signup-trigger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  border-radius: 999px;
  background: var(--butter);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: background .18s var(--ease-out), transform .15s var(--ease-out);
}
.signup-trigger:hover { background: var(--paper); }
.signup-trigger:active { transform: scale(.98); }
.signup-trigger:focus-visible { outline-color: var(--butter); }
.js .signup-trigger { display: inline-flex; }
.js .signup-sheet:not(:modal) { display: none; }

.signup-sheet {
  position: static;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}
.signup-sheet:modal {
  position: fixed;
  inset: auto 0 var(--kb, 0px) 0;
  width: 100%;
  max-width: none;
  max-height: calc(100dvh - 40px);
  margin: 0;
  overflow: auto;
  border-radius: 20px 20px 0 0;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 -20px 60px #00000059;
  animation: sheet-in .32s var(--ease-out) both;
}
.signup-sheet::backdrop { background: #23221e8c; animation: backdrop-in .25s ease-out both; }
.signup-sheet:modal .signup-form { padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); }

.sheet-head { display: none; position: relative; }
.signup-sheet:modal .sheet-head { display: block; }
.sheet-handle {
  display: block;
  width: 40px;
  height: 4px;
  margin: 0 auto 20px;
  border-radius: 2px;
  background: #fbfaf54d;
}
.sheet-close {
  position: absolute;
  top: 18px;
  right: -6px;
  padding: 8px;
  color: #fbfaf5b3;
}
.sheet-close:hover { color: var(--paper); }
.sheet-close:focus-visible { outline-color: var(--butter); }
.sheet-title {
  margin: 0 40px 10px 0;
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 500;
  line-height: .96;
  letter-spacing: -.02em;
}
.sheet-desc { color: #fbfaf5cc; font-size: 15px; line-height: 1.5; }

.signup-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.signup-label { display: block; margin: 22px 0 8px; font-size: 14px; font-weight: 500; }
.signup-field { min-width: 0; }
.signup-field input {
  width: 100%;
  padding: 9px 0;
  border-bottom: 1px solid #fbfaf566;
  color: var(--paper);
  font-size: 16px;
}
.signup-field input::placeholder { color: #fbfaf573; }
.signup-field input:focus-visible { outline: 0; border-bottom-color: var(--butter); }
.signup-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--butter);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: background .18s var(--ease-out), transform .15s var(--ease-out);
}
.signup-submit:hover { background: var(--paper); }
.signup-submit:active { transform: scale(.98); }
.signup-submit:disabled { cursor: wait; opacity: .72; }
.signup-submit:focus-visible { outline-color: var(--butter); }
.signup-spinner { animation: signup-spin .8s linear infinite; }

.signup-consent {
  margin-top: 14px;
  color: #fbfaf5a6;
  font-size: 11px;
  line-height: 1.5;
}
.signup-consent a { text-decoration: underline; text-underline-offset: 3px; }
.signup-consent a:hover { color: var(--paper); }
.signup-error { margin-top: 10px; color: #f3b1a4; font-size: 12px; }

.signup-done { outline: 0; padding-top: 4px; animation: signup-in .45s var(--ease-out) both; }
.signup-done-title {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
}
.signup-done-message { margin-top: 10px; font-size: 14px; line-height: 1.5; color: #fbfaf5cc; }
.signup-reset {
  margin-top: 16px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--butter);
  color: var(--butter);
  font-size: 14px;
  font-weight: 500;
}
.signup-reset:focus-visible { outline-color: var(--butter); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 900px) {
  .signup { display: flex; align-items: flex-start; gap: 40px; margin-top: 0; padding: 16px 48px; }
  .signup-lead { display: block; flex: 0 0 176px; padding-top: 9px; }
  .signup.is-done .signup-lead { display: none; }
  .signup-trigger, .js .signup-trigger { display: none; }
  .signup-sheet:not(:modal), .js .signup-sheet:not(:modal) { display: block; flex: 1; min-width: 0; }
  .signup-fields { display: flex; align-items: flex-start; gap: 40px; }
  .signup-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .signup-field { flex: 0 1 480px; }
  .signup-field input { padding: 8px 0; font-size: 15px; }
  .signup-submit { flex: none; width: auto; min-height: 46px; margin: -4px 0 0 auto; }
  .signup-consent { width: calc(100% + 216px); margin: 6px 0 0 -216px; }
  .signup-error { margin-top: 6px; }
  .signup-done { display: flex; align-items: center; gap: 28px; min-height: 61px; padding: 0; }
  .signup-done-title { font-size: 30px; }
  .signup-done-message { margin: 0; max-width: 52ch; }
  .signup-reset { margin: 0 0 0 auto; }
}

/* 6. Document pages: privacy policy, 404 --------------------------------- */
.doc-page {
  min-height: 100vh;
  background: var(--stone);
  color: var(--ink);
}

.doc-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 96px;
  padding: 0 36px;
  background: var(--butter);
}
.doc-header .brand { justify-self: center; }
.doc-header .brand-wordmark { height: 34px; }
.doc-back, .doc-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}
.doc-contact { justify-self: end; }
.doc-back:hover, .doc-contact:hover { text-decoration: underline; text-underline-offset: 4px; }

.privacy-main {
  display: grid;
  grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr);
  gap: clamp(48px, 8vw, 120px);
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 132px) clamp(24px, 6vw, 84px) 120px;
}
.privacy-intro { position: sticky; top: 164px; align-self: start; }
.privacy-intro h1 {
  margin: 25px 0 34px;
  font-family: var(--font-serif);
  font-size: clamp(64px, 7.4vw, 112px);
  font-weight: 500;
  line-height: .84;
  letter-spacing: -.03em;
}
.privacy-intro h1 em { font-weight: 500; }
.privacy-updated { color: var(--muted); font-size: 14px; }

.privacy-content { max-width: 720px; }
.privacy-content p, .privacy-content li { color: #3a3833; font-size: 14.5px; line-height: 1.75; }
.privacy-content > p + p { margin-top: 14px; }
.privacy-content a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.privacy-content .privacy-lead {
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.6vw, 38px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.policy-section {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  margin-top: 56px;
  padding-top: 23px;
  border-top: 1px solid #23221e33;
}
.policy-heading { display: flex; align-items: baseline; gap: 12px; }
.policy-heading span { color: var(--muted); font-size: 12px; font-weight: 500; }
.policy-heading h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.01em;
}
.policy-body > * + * { margin-top: 12px; }
.policy-body ul { padding-left: 20px; }
.policy-body li + li { margin-top: 7px; }

.notfound-main {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(64px, 12vw, 160px) clamp(24px, 6vw, 84px) 120px;
  text-align: center;
}
.notfound-main h1 {
  margin: 0 0 22px;
  font-family: var(--font-serif);
  font-size: clamp(52px, 7.5vw, 104px);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.03em;
}
.notfound-main p {
  max-width: 420px;
  margin: 0 auto 34px;
  color: #3a3833;
  font-size: 14.5px;
  line-height: 1.75;
}

@media (max-width: 840px) {
  .doc-header { min-height: 82px; padding: 0 18px; }
  .doc-header .brand-wordmark { height: 28px; }
  .doc-contact { display: none; }
  .privacy-main { display: block; padding-top: 58px; }
  .privacy-intro { position: static; }
  .privacy-intro h1 { font-size: 72px; }
  .privacy-content { margin-top: 72px; }
  .policy-section { display: block; }
  .policy-body { margin-top: 22px; }
}

@media (max-width: 480px) {
  .doc-header { grid-template-columns: 1fr auto; }
  .doc-header .brand { justify-self: end; }
  .doc-header .brand-wordmark { display: none; }
  .doc-header .brand-icon { display: block; height: 30px; }
  .doc-back span { display: none; }
  .doc-back svg { width: 20px; height: 20px; }
  .privacy-main { padding: 48px 20px 80px; }
  .privacy-intro h1 { font-size: 62px; }
  .privacy-content { margin-top: 58px; }
  .privacy-content p, .privacy-content li { font-size: 13.5px; }
  .policy-section { margin-top: 44px; }
}

/* 7. Motion -------------------------------------------------------------- */
@keyframes signup-spin { to { transform: rotate(360deg); } }
@keyframes signup-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
