/* ===========================================================
   krisandjessica.com — faithful recreation of the Squarespace site
   Cormorant Garamond (display serif) + Montserrat (sans labels)
   =========================================================== */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, blockquote, figure, ul, ol, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ── Tokens ────────────────────────────────────────────────── */
:root {
  --bg:           #f3ede2;     /* light cream, the page color */
  --paper:        #fbf8f1;     /* slightly lighter inset (unused but available) */
  --ink:          #2a2a2a;     /* near-black body color */
  --ink-soft:     #555;        /* muted secondary text */
  --ink-faint:    #8a8a8a;     /* even more muted (small labels) */
  --rule:         rgba(0, 0, 0, 0.18);
  --rule-soft:    rgba(0, 0, 0, 0.10);

  --serif: "Cormorant Garamond", "EB Garamond", "Adobe Garamond Pro", Garamond, Georgia, "Times New Roman", serif;
  --sans:  "Montserrat", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;

  --fs-title:    clamp(2.5rem, 5.5vw, 4.25rem);   /* "Kris & Jessica" wordmark */
  --fs-section:  clamp(1.05rem, 1.5vw, 1.2rem);   /* tracked-out section headers */
  --fs-h1:       clamp(0.95rem, 1.4vw, 1.05rem);  /* tracked-out h1 (e.g. CEREMONY) */
  --fs-body:     clamp(0.875rem, 1.2vw, 0.95rem);
  --fs-italic-lede: clamp(0.95rem, 1.3vw, 1.05rem);
  --fs-tiny:     0.7rem;

  --page-max:    820px;
  --frame-pad:   clamp(1.5rem, 4vw, 3.5rem);
  --section-y:   clamp(2.5rem, 5vw, 4rem);
}

/* ── Base ──────────────────────────────────────────────────── */
body {
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  padding: clamp(1.25rem, 3.5vw, 3rem);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-weight: 400; line-height: 1.25; }
p { margin: 0; }
a { transition: opacity 0.2s ease; }
a:hover { opacity: 0.55; }
::selection { background: var(--ink); color: var(--bg); }

/* ── Page frame ────────────────────────────────────────────── */
.page {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: clamp(3rem, 6vw, 5rem) var(--frame-pad) clamp(2.5rem, 5vw, 4rem);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule);
  outline-offset: 6px;
}

/* ── Header / nav ──────────────────────────────────────────── */
.site-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.site-title {
  font-family: var(--serif);
  font-size: var(--fs-title);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1;
}

.site-title a { display: inline-block; }

.primary-nav {
  margin-top: 1.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.primary-nav li {
  display: flex;
  align-items: center;
}

.primary-nav li::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--rule);
  margin: 0 0.45rem;
}

.primary-nav li:first-child::before { display: none; }

.primary-nav a {
  font-family: var(--sans);
  font-size: var(--fs-tiny);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0.25rem 0;
}

.primary-nav a[aria-current="page"] {
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
}

/* Trailing hairline after last nav item (matches original visual) */
.primary-nav::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--rule);
  margin-left: 0.45rem;
}
.primary-nav::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--rule);
  margin-right: 0.45rem;
}

/* ── Hero image ────────────────────────────────────────────── */
.hero {
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  width: 100%;
}

.hero img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Section dividers (hairline rule) ──────────────────────── */
.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: clamp(2rem, 4vw, 3rem) auto;
  max-width: 100%;
}

/* ── Lockup block (the names + "and") ──────────────────────── */
.lockup {
  text-align: center;
  margin: clamp(2.5rem, 4.5vw, 3.5rem) 0 clamp(2rem, 4vw, 3rem);
}

.lockup__name {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
}

.lockup__and {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-soft);
  margin: 0.85rem 0;
  letter-spacing: 0;
  text-transform: none;
}

.lockup__and::before,
.lockup__and::after { content: "— "; }
.lockup__and::after { content: " —"; }

/* ── Detail blocks (date / venue / time) ───────────────────── */
.details {
  text-align: center;
  margin: clamp(1.75rem, 3.5vw, 2.5rem) 0;
}

.details > * + * { margin-top: 0.4rem; }

.details .line {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
}

.details .line--soft {
  color: var(--ink-soft);
  font-weight: 400;
}

/* ── Lede (italic serif welcome / intro) ───────────────────── */
.lede {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--fs-italic-lede);
  color: var(--ink);
  line-height: 1.55;
  max-width: 36em;
  margin: clamp(1.5rem, 3vw, 2rem) auto;
}

/* ── Section title (tracked-out small caps, like "CEREMONY") ─ */
.section-title {
  text-align: center;
  font-family: var(--sans);
  font-size: var(--fs-h1);
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: clamp(2.5rem, 4.5vw, 3.5rem);
  margin-bottom: 1.25rem;
}

.section-title--lg {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

/* ── Day banner (e.g. "FRIDAY, APRIL 21, 2017") ────────────── */
.day-banner {
  text-align: center;
  font-family: var(--sans);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
  margin: clamp(2rem, 4vw, 3rem) 0 1rem;
}

/* ── Time / venue meta block ───────────────────────────────── */
.event-meta {
  text-align: center;
  margin: 0.5rem auto;
}

.event-meta .time {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
}

.event-meta .venue {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
  margin-top: 0.5rem;
}

.event-meta .place {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.35rem;
}

/* ── Body prose (paragraphs inside sections) ───────────────── */
.prose {
  text-align: center;
  max-width: 38em;
  margin: 0 auto;
}

.prose p {
  font-family: var(--serif);
  font-size: var(--fs-italic-lede);
  font-style: italic;
  line-height: 1.6;
  color: var(--ink);
}

.prose p + p { margin-top: 0.85rem; }

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose strong {
  font-style: normal;
  font-weight: 500;
}

/* ── Photo-booth grid ──────────────────────────────────────── */
.photobooth {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: clamp(1.5rem, 3vw, 2rem);
}

.photobooth img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

@media (min-width: 600px) {
  .photobooth { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .photobooth { grid-template-columns: repeat(4, 1fr); }
}

/* ── Video embeds ──────────────────────────────────────────── */
.video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 2rem 0;
  background: #000;
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video__caption {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

/* ── Footer (minimal) ──────────────────────────────────────── */
.site-footer {
  margin-top: clamp(3rem, 5vw, 4rem);
  text-align: center;
  font-family: var(--sans);
  font-size: var(--fs-tiny);
  color: var(--ink-faint);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ── Mobile adjustments ────────────────────────────────────── */
@media (max-width: 560px) {
  .primary-nav ul { gap: 0; }
  .primary-nav li::before { width: 14px; margin: 0 0.35rem; }
  .primary-nav::before, .primary-nav::after { width: 14px; margin: 0 0.35rem; }
  .primary-nav a { font-size: 0.62rem; letter-spacing: 0.14em; }
  .lockup__name { font-size: 0.92rem; letter-spacing: 0.26em; }
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
