:root {
  --desk: #efeae0;
  --sheet: #fbf9f4;
  --ink: #1b2230;
  --pencil: #5f636c;
  --red: #c9391f;
  --red-deep: #a92e18;
  --hi: #f4db4c;
  --rule: #d8d1c2;
  --rule-soft: #e8e2d5;
  --error: #9b2c1a;
  --btn-bg: #c9391f;
  --btn-fg: #fbf9f4;
  --btn-bg-hover: #a92e18;
  --band: #1b2230;
  --band-fg: #fbf9f4;
  --band-muted: #b9bdc6;
  --band-rule: rgba(251, 249, 244, 0.22);
  --red-on-band: #e8806b;
  --mount: #fff;
  --mount-ink: #5f636c;
  --shadow-object: 0 10px 30px rgba(27, 34, 48, 0.18);
  --shadow-sheet: 0 1px 0 rgba(27, 34, 48, 0.06), 0 12px 40px rgba(27, 34, 48, 0.1);
  --s1: 4px;
  --s2: 8px;
  --s3: 16px;
  --s4: 24px;
  --s5: 32px;
  --s6: 48px;
  --s7: 64px;
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --desk: #10141c;
    --sheet: #1b2230;
    --ink: #f1ede3;
    --pencil: #a8adb7;
    --red: #e25a41;
    --red-deep: #c9391f;
    --hi: #e4cb3b;
    --rule: #2e3748;
    --rule-soft: #26303f;
    --error: #e5786a;
    --band: #0b0e14;
    --mount: #f1ede3;
    --shadow-object: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-sheet: 0 1px 0 rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme="dark"] {
  --desk: #10141c;
  --sheet: #1b2230;
  --ink: #f1ede3;
  --pencil: #a8adb7;
  --red: #e25a41;
  --red-deep: #c9391f;
  --hi: #e4cb3b;
  --rule: #2e3748;
  --rule-soft: #26303f;
  --error: #e5786a;
  --band: #0b0e14;
  --mount: #f1ede3;
  --shadow-object: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-sheet: 0 1px 0 rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--desk);
}

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
  text-wrap: balance;
}

p {
  margin: 0;
}

/* R16 candidate default link role: every rendered anchor carries an explicit role that keeps
   winning on specificity, so these zero-and-one-specificity defaults only cover future anchors. */
a {
  color: var(--pencil);
}

a:where(:hover) {
  color: var(--ink);
}

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

.skip-link {
  position: absolute;
  z-index: 10;
  top: -100px;
  left: 16px;
  padding: 12px 16px;
  border-radius: 4px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

.first-sheet {
  padding: var(--s4);
}

.sheet {
  display: grid;
  min-height: calc(100svh - 48px);
  grid-template-rows: auto 1fr;
  gap: clamp(32px, 5vh, 64px);
  padding: clamp(20px, 3vw, 40px) clamp(20px, 4vw, 56px) clamp(24px, 4vw, 48px);
  transform: rotate(-0.2deg);
  border-radius: 2px;
  background: var(--sheet);
  box-shadow: var(--shadow-sheet);
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--s2) var(--s5);
}

.site-line {
  color: var(--pencil);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-header nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: var(--s4);
  flex-wrap: wrap;
}

.site-header nav a,
.site-footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.site-header nav a {
  border-bottom: 1px solid transparent;
  font-size: 14px;
}

.site-header nav a:hover {
  border-bottom-color: var(--red);
}

.stamp {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-self: end;
  color: var(--red);
  line-height: 0;
}

.stamp svg {
  width: clamp(120px, 13vw, 180px);
  height: auto;
  color: var(--red);
  mix-blend-mode: multiply;
}

.page-intro {
  align-self: center;
  max-width: 900px;
}

.page-intro h1 {
  margin-left: -0.03em;
  font-size: clamp(48px, 9.2vw, 150px);
  font-style: italic;
  font-variation-settings: "opsz" 60;
  letter-spacing: -0.015em;
  line-height: 0.95;
}

/* The 15vw mobile clamp ends at 480px; the 9.2vw clamp restarts below 60px. */
@media (400px < width <= 480px), (width > calc(15000px / 23)) {
  .page-intro h1 {
    font-variation-settings: "opsz" 72;
  }
}

.page-intro h1 span {
  white-space: nowrap;
}

.eyebrow {
  margin-bottom: var(--s3);
  color: var(--pencil);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-not-found {
  display: grid;
  justify-items: start;
}

.page-not-found h1 {
  font-style: normal;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: var(--s5);
  padding: 0 20px;
  border: 0;
  border-radius: 4px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 15px;
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--btn-bg-hover);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
  padding: var(--s3) var(--s4) var(--s5);
  color: var(--pencil);
  font-family: var(--mono);
  font-size: 12px;
}

.footer-contact p:first-child {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
}

#whatsapp-guidance {
  max-width: 64ch;
  margin-top: var(--s2);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
}

.site-footer a {
  color: var(--pencil);
  /* The contact line is a flex row and these anchors are unbreakable flex items; at enlarged text the
     email address alone exceeds a 320px viewport. `anywhere` zeroes the min-content contribution, which
     is what a flex item needs — `break-word` does not, and was measured not to fix it. */
  overflow-wrap: anywhere;
}

.site-footer a:hover {
  color: var(--ink);
}

/* Inline links inside a sentence need a non-colour affordance; the navigation list below is a list of
   links and stays undecorated, like the header. R16 candidate, pending explicit design approval by
   Nazeer with Farhana. */
.footer-contact p:first-child a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stamp svg {
    mix-blend-mode: normal;
  }
}

:root[data-theme="dark"] .stamp svg {
  mix-blend-mode: normal;
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .site-header nav {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .site-line {
    display: none;
  }

  .site-header .stamp {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .site-header nav {
    grid-column: 1;
    grid-row: 2;
    justify-self: stretch;
    padding-top: var(--s2);
  }
}

@media (max-width: 480px) {
  .page-intro h1 {
    font-size: clamp(48px, 15vw, 64px);
  }

  .page-intro h1 span {
    white-space: normal;
  }
}

/* Homepage: sheet, photo ledger, ordered narrative, and wedding facts. */
:root {
  --mark-top: 38%;
  --mark-bottom: 90%;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mark-top: 0%;
    --mark-bottom: 100%;
    --mark-start: 100%;
  }
}

:root[data-theme="dark"] {
  --mark-top: 0%;
  --mark-bottom: 100%;
  --mark-start: 100%;
}

.site-header,
.home-intro {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
}

.home-intro {
  align-self: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.home-intro .page-intro,
.hero-grid > *,
.story > *,
.step > * {
  min-width: 0;
}

.hi-line {
  margin-top: var(--s5);
  max-width: 560px;
  font-family: var(--serif);
  font-size: clamp(20px, 1.9vw, 26px);
  font-variation-settings: "opsz" 24;
  line-height: 1.35;
}

/* 1.9vw reaches the 26px cap. */
@media (width >= calc(26000px / 19)) {
  .hi-line {
    font-variation-settings: "opsz" 36;
  }
}

mark {
  padding: 0 0.12em;
  background: linear-gradient(transparent var(--mark-top), var(--hi) var(--mark-top), var(--hi) var(--mark-bottom), transparent var(--mark-bottom));
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: #1b2230;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s2);
  max-width: 640px;
  margin-top: var(--s5);
}

.brief label {
  color: var(--pencil);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brief-field {
  display: flex;
  gap: var(--s2);
  min-height: 48px;
  padding: 12px 0;
  border-bottom: 1.5px solid var(--ink);
}

.caret {
  flex: none;
  width: 2px;
  height: 1.25em;
  margin-top: 0.1em;
  background: var(--red);
}

.brief-field:focus-within {
  border-bottom-color: var(--red);
  box-shadow: 0 1.5px 0 var(--red);
}

.brief-field:has(textarea[aria-invalid="true"]) {
  border-bottom-color: var(--error);
  box-shadow: 0 1.5px 0 var(--error);
}

.brief-field:focus-within .caret {
  display: none;
}

.brief textarea {
  flex: 1;
  min-width: 0;
  min-height: 3em;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  caret-color: var(--red);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
}

.brief textarea::placeholder {
  color: var(--pencil);
  opacity: 1;
}

.actions {
  display: flex;
  align-items: center;
  gap: var(--s3) var(--s4);
  flex-wrap: wrap;
  margin-top: var(--s2);
}

.actions .button {
  margin-top: 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 44px;
  color: var(--pencil);
  font-size: 15px;
  text-underline-offset: 4px;
}

.text-link:hover {
  color: var(--ink);
}

.brief-email-action {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.email,
.document,
.helper,
.wedding-facts {
  overflow-wrap: anywhere;
}

.helper {
  max-width: 64ch;
  color: var(--pencil);
  font-size: 14px;
  line-height: 1.5;
}

.brief-error {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.brief-error .state-chip {
  display: inline-flex;
  padding: 2px var(--s2);
  transform: rotate(-2deg);
  border: 1.5px solid var(--error);
  color: var(--error);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.document,
figcaption {
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.7;
}

.facts {
  margin-top: var(--s4);
  color: var(--pencil);
}

.polaroid {
  justify-self: end;
  width: min(100%, 340px);
  margin: 0;
  padding: 14px 14px 0;
  transform: rotate(2deg);
  background: var(--mount);
  box-shadow: var(--shadow-object);
}

.polaroid img,
.story-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.polaroid figcaption {
  min-height: 62px;
  padding: 14px 0;
  color: var(--mount-ink);
  font-size: 12px;
  line-height: 1.5;
}

.founder {
  max-width: 60ch;
  margin-top: var(--s6);
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  font-variation-settings: "opsz" 24;
}

.founder span {
  display: block;
  margin-top: var(--s2);
  color: var(--pencil);
  font-family: var(--mono);
  font-size: 12px;
  font-style: normal;
}

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--s4);
}

.section {
  padding: clamp(56px, 8vw, 112px) 0;
}

h2 {
  font-size: clamp(34px, 4.6vw, 60px);
  font-variation-settings: "opsz" 36;
}

/* 4.6vw reaches 40px; the lower bucket includes the 36–40px gap. */
@media (width >= calc(20000px / 23)) {
  h2 {
    font-variation-settings: "opsz" 60;
  }
}

h3 {
  font-size: clamp(26px, 2.8vw, 36px);
  font-variation-settings: "opsz" 36;
  line-height: 1.15;
}

.kicker {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  flex-wrap: wrap;
  margin-bottom: var(--s6);
}

.kicker .eyebrow {
  margin-bottom: 0;
}

.ledger,
.steps,
.faqs {
  border-top: 1px solid var(--rule);
}

.story {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) minmax(0, 1.4fr);
  align-items: start;
  gap: var(--s5);
  padding-block: var(--s5);
  border-bottom: 1px solid var(--rule);
}

.story-frame {
  width: min(100%, 240px);
  margin: 0;
  padding: 10px 10px 28px;
  background: var(--mount);
  box-shadow: var(--shadow-object);
}

.story-frame figcaption {
  margin-top: var(--s2);
  color: var(--mount-ink);
  font-size: 12px;
}

.story-brief {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
}

.story-brief h3 {
  margin-bottom: var(--s4);
}

.story .eyebrow {
  margin-bottom: var(--s2);
}

.story-concept > p:last-child {
  font-family: var(--serif);
  font-size: 24px;
  font-variation-settings: "opsz" 24;
  line-height: 1.4;
}

.story-note {
  margin-top: var(--s4);
  color: var(--pencil);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: var(--s5);
  align-items: start;
  padding-block: var(--s5);
  border-bottom: 1px solid var(--rule);
}

.step-number {
  padding-top: var(--s2);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.step h3,
.faqs h3 {
  margin-bottom: var(--s2);
}

.step h3 {
  overflow-wrap: anywhere;
}

.step h3 + p,
.faqs p {
  max-width: 64ch;
  color: var(--pencil);
}

.artifact {
  padding: 18px 20px;
  border-radius: 2px;
  background: var(--sheet);
  box-shadow: var(--shadow-sheet);
  font-family: var(--mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.7;
}

.artifact-label {
  margin-bottom: var(--s2);
  color: var(--pencil);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.concept > p:not(.artifact-label) {
  font-family: var(--serif);
  font-size: 17px;
  font-variation-settings: "opsz" 24;
}

.concept-terms {
  margin-top: var(--s3);
  padding-top: var(--s2);
  border-top: 1.5px solid var(--red);
}

.weddings {
  background: var(--band);
  color: var(--band-fg);
}

.weddings .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: start;
  gap: clamp(32px, 6vw, 96px);
}

.weddings .eyebrow,
.weddings .helper,
.wedding-intro,
.wedding-facts dd {
  color: var(--band-muted);
}

.wedding-intro {
  max-width: 48ch;
  margin-top: var(--s3);
  font-size: 18px;
}

.weddings .helper {
  margin-top: var(--s3);
}

.wedding-facts {
  margin: 0;
  border-top: 1px solid var(--band-rule);
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.7;
}

.wedding-facts > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: var(--s3);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--band-rule);
}

.wedding-facts dd {
  margin: 0;
}

.faqs > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--s5);
  padding-block: var(--s5);
  border-bottom: 1px solid var(--rule);
}

.closing {
  padding: var(--s4);
}

.closing .sheet {
  min-height: 0;
  grid-template-rows: auto;
  gap: var(--s3);
}

.closing h2 {
  max-width: 1120px;
  font-size: clamp(44px, 6vw, 96px);
  font-style: italic;
  font-variation-settings: "opsz" 60;
  line-height: 0.98;
}

@media (width > 1000px) {
  .closing h2 {
    font-variation-settings: "opsz" 72;
  }
}

@media (max-width: 1100px) {
  .home-intro h1 span {
    white-space: normal;
  }
}

@media (max-width: 860px) {
  .hero-grid {
    gap: var(--s5);
  }

  .polaroid {
    width: 260px;
  }

  .story,
  .step,
  .weddings .wrap,
  .faqs > div {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s4);
  }

  .kicker {
    flex-direction: column;
    align-items: start;
    gap: var(--s2);
  }
}

@media (max-width: 699px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .polaroid {
    justify-self: start;
    width: min(100%, 280px);
  }
}

@media (max-width: 480px) {
  .story-frame {
    width: min(100%, 200px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .home-intro mark {
    animation: swipe 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.5s both;
  }

  .polaroid {
    animation: settle 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .caret {
    animation: blink 1.1s steps(1) infinite;
  }

  @keyframes swipe {
    from { background-size: var(--mark-start, 0%) 100%; }
    to { background-size: 100% 100%; }
  }

  @keyframes settle {
    from { transform: rotate(0deg); }
    to { transform: rotate(2deg); }
  }

  @keyframes blink {
    50% { opacity: 0; }
  }
}

/* Policy pages: readable documents inside the shared sheet. */
.policy {
  align-self: start;
  width: 100%;
  min-width: 0;
  max-width: 1120px;
  margin-inline: auto;
}

.first-sheet:has(.policy) {
  overflow-x: clip;
}

.sheet:has(.policy) {
  position: relative;
  isolation: isolate;
  transform: none;
  background: transparent;
  box-shadow: none;
}

.sheet:has(.policy)::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  transform: rotate(-0.2deg);
  border-radius: 2px;
  background: var(--sheet);
  box-shadow: var(--shadow-sheet);
  content: "";
}

.policy h1 {
  max-width: 18ch;
  overflow-wrap: anywhere;
  font-size: clamp(34px, 4.6vw, 60px);
  font-style: normal;
  font-variation-settings: "opsz" 36;
  font-weight: 400;
  line-height: 1.05;
}

.policy h2 {
  overflow-wrap: anywhere;
  font-size: clamp(26px, 2.8vw, 36px);
  font-style: normal;
  font-variation-settings: "opsz" 36;
  font-weight: 400;
  line-height: 1.15;
}

@media (width >= calc(20000px / 23)) {
  .policy h1 {
    font-variation-settings: "opsz" 60;
  }
}

.policy-copy {
  display: grid;
  min-width: 0;
  gap: var(--s5);
  max-width: 64ch;
  margin-top: var(--s6);
}

.policy-copy section {
  display: grid;
  min-width: 0;
  gap: var(--s3);
}

.policy-copy h2 {
  margin-bottom: var(--s2);
}

.policy-copy p,
.policy-copy li {
  overflow-wrap: anywhere;
}

.policy-copy ul {
  display: grid;
  gap: var(--s2);
  margin: 0;
  padding-left: var(--s4);
}

.policy-table-wrap {
  max-width: 100%;
  min-width: 0;
}

.policy table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.7;
}

.policy th,
.policy td {
  padding: var(--s3) var(--s2);
  border-bottom: 1px solid var(--rule);
  overflow-wrap: anywhere;
  text-align: left;
  vertical-align: top;
}

.policy th:first-child {
  width: 40%;
}

.policy thead th {
  color: var(--pencil);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  .policy th,
  .policy td {
    padding-inline: var(--s1);
  }
}
