/* Clayton & Karina — cool beige & greens, classic line detailing */
:root {
  --parchment: #f2efe4;
  --cream: #e8e4d2;
  --ink: #233020;
  --muted: #6d7260;
  --green: #3d5a3a;
  --green-deep: #1e3a26;
  --green-soft: #c3cdae;
  --sage: #8a9a78;
  --line: #d4d6bd;
  --white: #fbfaf3;
  --error: #a33b32;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  background: var(--parchment);
  color: var(--ink);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 96px 32px 72px;
  position: relative;
  background:
    radial-gradient(ellipse 70% 50% at 20% 0%, rgba(61, 90, 58, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 70% 50% at 80% 100%, rgba(138, 154, 120, 0.10) 0%, transparent 70%),
    var(--parchment);
  border-bottom: 1px solid var(--line);
}
/* Double inset frame — classic invitation border */
.hero::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid var(--green-soft);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 20px;
  border: 1px solid var(--line);
  pointer-events: none;
}
.hero-inner { position: relative; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 28px;
  display: inline-block;
  position: relative;
  padding: 0 18px;
}
.eyebrow::before, .eyebrow::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 44px;
  height: 1px;
  background: var(--green-soft);
}
.eyebrow::before { left: -48px; }
.eyebrow::after { right: -48px; }
.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(52px, 10vw, 96px);
  line-height: 1.08;
  letter-spacing: 0.02em;
  color: var(--green-deep);
}
.hero h1 .amp {
  font-style: italic;
  font-weight: 600;
  color: var(--sage);
  font-size: 0.62em;
  display: block;
  margin: 6px 0;
}

/* Ornamental divider: triple hairline with leaf diamond */
.rule { margin: 30px auto; width: 220px; height: 16px; position: relative; }
.rule::before, .rule::after {
  content: '';
  position: absolute; left: 0; right: 0;
  height: 1px; background: var(--green-soft);
}
.rule::before { top: 4px; }
.rule::after { top: 11px; }
.rule span { position: absolute; inset: 0; }
.rule span::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 7px;
  height: 1px; background: var(--line);
}
.rule span::after {
  content: '◆';
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -52%) rotate(45deg) scale(0.55);
  background: var(--parchment);
  padding: 0 10px;
  color: var(--green);
  font-size: 15px;
}
.card .rule span::after, .thanks .rule span::after { background: var(--white); }
footer .rule span::after { background: var(--parchment); }

.hero .date {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 26px;
}

/* ---------- Countdown ---------- */
.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 3vw, 22px);
  margin-top: 6px;
  position: relative;
}
/* Hairline running behind the countdown boxes */
.countdown::before {
  content: '';
  position: absolute;
  top: 50%; left: 6%; right: 6%;
  height: 1px;
  background: var(--green-soft);
}
.cd-unit {
  min-width: 74px;
  padding: 12px 8px 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 2px solid var(--green);
  border-radius: 2px;
  position: relative;
}
.cd-num {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(26px, 5vw, 36px);
  color: var(--green-deep);
  line-height: 1.1;
}
.cd-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  margin-top: 4px;
}

/* ---------- Photos ---------- */
.photos { text-align: center; padding: 48px 24px 8px; }
.photo-frame {
  display: inline-block;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  outline: 1px solid var(--green-soft);
  outline-offset: 5px;
  box-shadow: 0 18px 44px rgba(61, 90, 58, 0.14);
  position: relative;
}
/* Corner ticks on all four corners */
.photo-frame i { position: absolute; width: 20px; height: 20px; border: 0 solid var(--green); }
.photo-frame i:nth-child(1) { top: -7px; left: -7px; border-top-width: 2px; border-left-width: 2px; }
.photo-frame i:nth-child(2) { top: -7px; right: -7px; border-top-width: 2px; border-right-width: 2px; }
.photo-frame i:nth-child(3) { bottom: -7px; left: -7px; border-bottom-width: 2px; border-left-width: 2px; }
.photo-frame i:nth-child(4) { bottom: -7px; right: -7px; border-bottom-width: 2px; border-right-width: 2px; }
.couple-photo {
  width: min(520px, 78vw);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

/* ---------- RSVP card ---------- */
.rsvp { padding: 56px 24px 72px; }
.card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  padding: clamp(40px, 6vw, 60px);
  box-shadow: 0 18px 44px rgba(61, 90, 58, 0.10);
  position: relative;
}
/* Full inset hairline frame */
.card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid var(--green-soft);
  pointer-events: none;
}
.card h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(30px, 5vw, 40px);
  text-align: center;
  letter-spacing: 0.02em;
  color: var(--green-deep);
}
.lede { text-align: center; color: var(--muted); font-style: italic; margin-bottom: 34px; }
.lede strong { color: var(--ink); font-style: normal; }

.field { margin-bottom: 20px; }
.row { display: flex; gap: 16px; }
.row .field { flex: 1; }
.row .field.narrow { flex: 0.72; }

label { display: block; font-size: 16px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green-deep); margin-bottom: 7px; }
label em { color: var(--sage); font-style: normal; }

input[type=text], input[type=email], input[type=tel], input[type=number] {
  width: 100%;
  font-family: inherit;
  font-size: 19px;
  font-weight: 600;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--green-soft);
  background: var(--parchment);
  color: var(--ink);
  border-radius: 2px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus { outline: none; border-color: var(--green); border-bottom-color: var(--green); box-shadow: 0 0 0 3px rgba(61, 90, 58, 0.12); }

.err { color: var(--error); font-size: 16px; font-weight: 700; font-style: italic; margin-top: 5px; min-height: 0; }
.form-err { text-align: center; margin-bottom: 12px; }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

.btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 16px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--green-deep);
  border: 1px solid var(--green-deep);
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.25s, border-color 0.25s;
}
.btn:hover:not(:disabled) { background: var(--green); border-color: var(--green); }
.btn:disabled { opacity: 0.55; cursor: default; }

/* ---------- Thanks ---------- */
.thanks { text-align: center; padding: 20px 0 8px; position: relative; }
.thanks h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 34px; color: var(--green-deep); }
.thanks p { margin-top: 10px; font-size: 21px; font-weight: 600; }
.thanks .sig { font-style: italic; font-weight: 400; color: var(--muted); margin-top: 18px; }

/* ---------- Footer ---------- */
footer { text-align: center; padding: 36px 24px 56px; color: var(--muted); }
footer .rule { margin-top: 0; }
/* Double top rule */
footer::before {
  content: '';
  display: block;
  border-top: 3px double var(--green-soft);
  margin-bottom: 34px;
}
.monogram {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--green);
  letter-spacing: 0.3em;
  margin-bottom: 8px;
}
footer p:last-child { font-weight: 700; letter-spacing: 0.1em; }

/* ---------- Admin ---------- */
.admin-wrap { max-width: 1080px; margin: 60px auto; padding: 0 24px; }
.admin-card {
  background: var(--white); border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  padding: clamp(28px, 5vw, 48px);
  box-shadow: 0 18px 44px rgba(61, 90, 58, 0.10);
  position: relative;
}
.admin-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid var(--green-soft);
  pointer-events: none;
}
.admin-card h1 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 34px; margin-bottom: 6px; color: var(--green-deep); }
.admin-sub { color: var(--muted); font-style: italic; margin-bottom: 26px; }
.admin-actions { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.btn.small { width: auto; padding: 10px 22px; font-size: 15px; display: inline-block; text-decoration: none; text-align: center; }
.btn.ghost { background: transparent; color: var(--ink); }
table.guests { width: 100%; border-collapse: collapse; font-size: 17px; }
table.guests th {
  text-align: left; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--green-deep); padding: 10px 12px; border-bottom: 2px solid var(--green-soft); white-space: nowrap;
}
table.guests td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.guests tr:hover td { background: #f4f5ea; }
.del { background: none; border: none; color: var(--error); cursor: pointer; font-size: 16px; font-weight: 700; font-style: italic; font-family: inherit; }
.empty { text-align: center; color: var(--muted); font-style: italic; padding: 40px 0; }
.login-card { max-width: 420px; margin: 90px auto; }

@media (max-width: 640px) {
  .row { flex-direction: column; gap: 0; }
  .row .field.narrow { flex: 1; }
  table.guests { font-size: 15px; }
  .hero::before { inset: 8px; }
  .hero::after { inset: 12px; }
}
