/* ===================== Tokens ===================== */
:root {
  --ink:        #1c1a17;
  --ink-soft:   #4a453e;
  --ink-mute:   #7d766c;
  --paper:      #f4f1ec;
  --paper-warm: #fbf9f5;
  --line:       #ddd6cb;
  --accent:     #6a5c4a;
  --accent-ink: #2f2a23;
  --danger:     #9c3b2e;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --shell: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

/* ===================== Hero ===================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: #6d7169 url("background.webp") center / cover no-repeat;
  transform: scale(1.02);
}

/* Keeps the moka pot readable on the left, darkens the right for type */
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(20,19,17,0.10) 0%, rgba(20,19,17,0.28) 38%, rgba(20,19,17,0.62) 68%, rgba(20,19,17,0.74) 100%),
    linear-gradient(to bottom, rgba(20,19,17,0.22), rgba(20,19,17,0) 30%, rgba(20,19,17,0.35));
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 32px 28px 88px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
}

/* --- Brand lockup --- */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fbf9f5;
}

.brand__mark {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.brand__rule {
  width: 34px;
  height: 1px;
  background: rgba(251,249,245,0.5);
}

.brand__tag {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(251,249,245,0.72);
}

/* --- Glass form panel, right-aligned --- */
.panel {
  justify-self: end;
  align-self: center;
  width: 100%;
  max-width: 452px;
  padding: 44px 40px 38px;
  background: rgba(251,249,245,0.94);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 2px;
  box-shadow: 0 30px 70px -20px rgba(15,14,12,0.55);
}

.panel__eyebrow {
  margin: 0 0 14px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.panel__title {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 3.4vw, 2.85rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.panel__lede {
  margin: 0 0 30px;
  font-size: 0.925rem;
  line-height: 1.62;
  color: var(--ink-soft);
}

/* --- Fields --- */
.field { margin-bottom: 18px; }

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.opt {
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--ink-mute);
}

.field input {
  width: 100%;
  padding: 12px 2px;
  font-family: var(--sans);
  font-size: 0.975rem;
  font-weight: 300;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  transition: border-color 0.22s ease;
}

.field input::placeholder { color: #b3aa9d; }

.field input:focus {
  outline: none;
  border-bottom-color: var(--accent-ink);
}

.field input:focus-visible {
  outline: 2px solid rgba(47,42,35,0.25);
  outline-offset: 4px;
}

.field.is-invalid input { border-bottom-color: var(--danger); }

.err {
  display: block;
  min-height: 1.15em;
  padding-top: 5px;
  font-size: 0.755rem;
  color: var(--danger);
}

/* --- Button --- */
button[type="submit"] {
  width: 100%;
  margin-top: 10px;
  padding: 15px 20px;
  font-family: var(--sans);
  font-size: 0.735rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-warm);
  background: var(--accent-ink);
  border: 1px solid var(--accent-ink);
  border-radius: 1px;
  cursor: pointer;
  transition: background 0.24s ease, color 0.24s ease;
}

button[type="submit"]:hover:not(:disabled) {
  background: transparent;
  color: var(--accent-ink);
}

button[type="submit"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.fineprint {
  margin: 16px 0 0;
  font-size: 0.735rem;
  line-height: 1.5;
  text-align: center;
  color: var(--ink-mute);
}

/* --- Success state --- */
.success { text-align: center; padding: 8px 0 4px; }

.success__mark { font-size: 2rem; margin-bottom: 10px; }

.success h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 400;
  color: var(--ink);
}

.success p {
  margin: 0 0 6px;
  font-size: 0.925rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* --- Scroll cue --- */
.scroll-cue {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(251,249,245,0.82);
  transition: color 0.2s ease;
}

.scroll-cue:hover { color: #fff; }

.scroll-cue svg { animation: nudge 2.4s ease-in-out infinite; }

@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

/* ===================== Gifts ===================== */
.gifts {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 104px 28px 96px;
}

.gifts__head {
  max-width: 620px;
  margin-bottom: 56px;
}

.section-eyebrow {
  margin: 0 0 14px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.section-title {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.section-lede {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.gifts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.gift {
  display: flex;
  flex-direction: column;
  background: var(--paper-warm);
  transition: background 0.28s ease;
}

.gift:hover { background: #fff; }

/* Feature tile spans the full width, media beside body */
.gift--feature {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: stretch;
}

.gift--feature .gift__media {
  flex: 1 1 58%;
  aspect-ratio: 16 / 10;
}

.gift--feature .gift__body {
  flex: 1 1 42%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 52px;
}

.gift--feature .gift__name { font-size: clamp(2rem, 3vw, 2.6rem); }
.gift--feature .gift__desc { font-size: 0.975rem; max-width: 34ch; }

/* --- Media slot: reserves space before the image loads --- */
.gift__media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background:
    repeating-linear-gradient(45deg, #efebe4 0 12px, #eae5dc 12px 24px);
}

.gift__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* Broken/missing image: hide the element, leave the placeholder texture */
.gift__media img.is-missing { opacity: 0; }

.gift:hover .gift__media img { transform: scale(1.035); }

.gift__body { padding: 32px 32px 36px; }

/* --- Meta line: label on the left, winner count on the right --- */
.gift__count {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding-bottom: 12px;
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--line);
}

.gift__odds {
  flex: none;
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}

.gift__name {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.15;
}

.gift__desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.62;
  color: var(--ink-soft);
}

.gift__items {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.gift__items li {
  padding: 10px 0 10px 18px;
  position: relative;
  font-size: 0.85rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.gift__items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 6px;
  height: 1px;
  background: var(--ink-mute);
}

/* --- Everyone tile: inverted, typographic panel instead of a photo --- */
.gift--everyone {
  background: var(--accent-ink);
}

.gift--everyone:hover { background: #262119; }

.gift--everyone .gift__body { padding: 32px 32px 36px; }
.gift--everyone .gift__name { color: var(--paper-warm); }
.gift--everyone .gift__desc { color: rgba(244,241,236,0.72); }

.gift--everyone .gift__count {
  color: rgba(244,241,236,0.6);
  border-bottom-color: rgba(244,241,236,0.18);
}

.gift--everyone .gift__odds { color: var(--paper-warm); }

.gift__media--type {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: none;
  border-bottom: 1px solid rgba(244,241,236,0.14);
}

/* Sans, not serif: Cormorant's "1" reads as a small-cap "I" at display size */
.gift__figure {
  font-family: var(--sans);
  font-size: clamp(3.4rem, 6.5vw, 5.2rem);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--paper-warm);
}

.gift__figure-note {
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244,241,236,0.55);
}

.gift__cta {
  display: inline-block;
  margin-top: 26px;
  padding-bottom: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper-warm);
  border-bottom: 1px solid rgba(244,241,236,0.4);
  transition: border-color 0.22s ease;
}

.gift__cta:hover { border-bottom-color: var(--paper-warm); }

/* ===================== FAQ ===================== */
.faq {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 28px 104px;
}

.faq__head { margin-bottom: 40px; }

.faq__list {
  border-top: 1px solid var(--line);
}

.faq__item {
  border-bottom: 1px solid var(--line);
}

.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  background: none;
  border: 0;
  text-align: left;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.faq__q:hover { color: var(--accent-ink); }

.faq__q:focus-visible {
  outline: 2px solid rgba(47,42,35,0.25);
  outline-offset: 4px;
}

.faq__icon {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.faq__icon::before {
  width: 14px;
  height: 1px;
  transform: translate(-50%, -50%);
}

.faq__icon::after {
  width: 1px;
  height: 14px;
  transform: translate(-50%, -50%);
}

.faq__q[aria-expanded="true"] .faq__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.28s ease;
}

.faq__a > p {
  min-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0 4px 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.faq__item.is-open .faq__a {
  grid-template-rows: 1fr;
}

.faq__item.is-open .faq__a > p {
  padding-bottom: 22px;
}

/* ===================== Footer ===================== */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 34px 28px 44px;
  border-top: 1px solid var(--line);
}

.footer__mark {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink);
}

.footer__copy {
  font-size: 0.735rem;
  color: var(--ink-mute);
}

/* ===================== Responsive ===================== */
/* Two across: the welcome tile widens so no cell is left empty */
@media (max-width: 1040px) {
  .gifts__grid { grid-template-columns: repeat(2, 1fr); }
  .gift--everyone { grid-column: 1 / -1; }
  .gift--everyone .gift__media--type { aspect-ratio: 21 / 9; }
}

@media (max-width: 900px) {
  .hero__scrim {
    background:
      linear-gradient(to bottom, rgba(20,19,17,0.30) 0%, rgba(20,19,17,0.55) 45%, rgba(20,19,17,0.72) 100%);
  }

  .panel { justify-self: center; max-width: 520px; }

  .gifts { padding: 76px 22px 72px; }

  .gifts__grid { grid-template-columns: 1fr; }

  .gift--feature { flex-direction: column; }

  .gift--feature .gift__media { aspect-ratio: 4 / 3; flex: none; width: 100%; }

  .gift--feature .gift__body,
  .gift--everyone .gift__body { padding: 34px 28px 38px; }

  .gift--feature .gift__name { font-size: 1.75rem; }
}

@media (max-width: 560px) {
  .hero__inner { padding: 24px 18px 72px; gap: 22px; }
  .panel { padding: 34px 24px 30px; }
  .brand__tag { display: none; }
  .gifts { padding: 64px 18px 60px; }
  .gifts__head { margin-bottom: 40px; }
}

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