/*
Theme Name: Amy & Ryan Wedding
Theme URI: https://example.com
Author: Amy & Ryan
Description: A one-page wedding website theme for The Wedding Of Amy & Ryan, styled to match the couple's invitation suite (cream + sage green, script and tracked serif type). Pairs with the "Wedding RSVP" plugin.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: amy-ryan-wedding
*/

/* -------------------------------------------------
   1. Brand tokens — sampled from the invitation suite.
   Change these three colours and the whole site updates.
   ------------------------------------------------- */
:root {
  --color-cream: #faf7f1;
  --color-cream-panel: #ffffff;
  --color-sage: #5f6e52;       /* headings, script, accents */
  --color-sage-dark: #4a5640;  /* body copy */
  --color-sage-line: #cdd2c1;  /* hairline dividers */
  --color-sage-tint: #eef0e7;  /* soft fills, focus states */

  --font-script: "Alex Brush", "Brush Script MT", cursive;
  --font-serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;

  --max-width: 760px;
  --gutter: 24px;
}

/* -------------------------------------------------
   2. Reset & base
   ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--color-cream);
  color: var(--color-sage-dark);
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Whitworth Hall, traced from the invitation illustration, sitting
   quietly behind the whole page. Fixed positioning (rather than
   background-attachment: fixed, which is unreliable on iOS) keeps it
   visible the entire time someone scrolls, not just near the top.
   Alpha is already baked into the PNG (up to ~36% at its darkest
   lines) so it reads clearly as the venue without ever competing
   with the text placed on top of it. */
.site-bg-illustration {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url('assets/images/whitworth-hall-outline.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: min(780px, 94vw) auto;
}

@media (max-width: 480px) {
  .site-bg-illustration {
    background-size: min(520px, 96vw) auto;
  }
}

/* Everything else sits above the fixed illustration. */
.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

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

a {
  color: var(--color-sage);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover,
a:focus { color: var(--color-sage-dark); }

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

.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}

/* -------------------------------------------------
   3. Layout shell
   ------------------------------------------------- */
.site-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-section {
  padding: 64px 0;
}
.site-section + .site-section {
  border-top: 1px solid var(--color-sage-line);
}

.site-section__heading {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-sage);
  text-align: center;
  margin: 0 0 40px;
}

/* -------------------------------------------------
   4. Header / hero
   ------------------------------------------------- */
.site-header {
  padding: 72px 0 56px;
  text-align: center;
}

.site-header__logo {
  margin: 0 auto 28px;
  max-width: 220px;
}
.site-header__logo img {
  margin: 0 auto;
  border-radius: 50%;
}

.site-title {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(38px, 8vw, 68px);
  line-height: 1.25;
  color: var(--color-sage);
}
.site-title a {
  color: inherit;
  text-decoration: none;
}

/* A compact, unmissable date line so guests never mistake the year —
   this wedding is some way off, so "2029" gets said twice: once here,
   and again inlined within the full sentence below. */
.site-date-badge {
  display: inline-block;
  margin: 18px 0 0;
  padding: 6px 18px;
  border: 1px solid var(--color-sage);
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--color-sage);
}

.site-tagline {
  margin: 28px auto 0;
  max-width: 480px;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-sage-dark);
}
.site-tagline p {
  margin: 0 0 6px;
}
.site-tagline p:last-child { margin-bottom: 0; }

.tagline-year {
  color: var(--color-sage);
  font-weight: 600;
}

.hero-divider {
  width: 46px;
  height: 1px;
  background: var(--color-sage);
  margin: 32px auto 0;
  border: 0;
}

/* -------------------------------------------------
   5. RSVP section
   ------------------------------------------------- */
.rsvp-section {
  text-align: center;
}

.rsvp-section .site-section__heading {
  margin-bottom: 12px;
}

.rsvp-section__intro {
  max-width: 480px;
  margin: 0 auto 40px;
  font-size: 17px;
}

/* Wedding RSVP plugin renders its own form markup inside
   .wedding-rsvp-form — these rules theme that markup so the
   plugin looks native to the site regardless of which theme
   activates it. */
.wedding-rsvp-form {
  max-width: 440px;
  margin: 0 auto;
  text-align: left;
}

.wedding-rsvp-form .rsvp-field {
  margin-bottom: 26px;
}

.wedding-rsvp-form label,
.wedding-rsvp-form legend {
  display: block;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-sage);
  margin-bottom: 10px;
  padding: 0;
}

.wedding-rsvp-form input[type="text"],
.wedding-rsvp-form input[type="email"],
.wedding-rsvp-form textarea {
  width: 100%;
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--color-sage-dark);
  background: var(--color-cream-panel);
  border: 1px solid var(--color-sage-line);
  border-radius: 2px;
  padding: 12px 14px;
}
.wedding-rsvp-form input[type="text"]:focus,
.wedding-rsvp-form input[type="email"]:focus,
.wedding-rsvp-form textarea:focus {
  border-color: var(--color-sage);
  background: var(--color-sage-tint);
}

.wedding-rsvp-form textarea {
  min-height: 96px;
  resize: vertical;
}

.wedding-rsvp-form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.wedding-rsvp-form .rsvp-attend-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wedding-rsvp-form .rsvp-attend-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--color-sage-line);
  border-radius: 2px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  font-size: 17px;
}
.wedding-rsvp-form .rsvp-attend-option:hover {
  border-color: var(--color-sage);
}
.wedding-rsvp-form .rsvp-attend-option input {
  margin-top: 4px;
  accent-color: var(--color-sage);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.wedding-rsvp-form .rsvp-attend-option:has(input:checked) {
  background: var(--color-sage-tint);
  border-color: var(--color-sage);
}

.wedding-rsvp-form .rsvp-submit {
  display: inline-block;
  width: 100%;
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-cream);
  background: var(--color-sage);
  border: 1px solid var(--color-sage);
  border-radius: 2px;
  padding: 15px 20px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.wedding-rsvp-form .rsvp-submit:hover,
.wedding-rsvp-form .rsvp-submit:focus-visible {
  background: transparent;
  color: var(--color-sage);
}

.wedding-rsvp-form .rsvp-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rsvp-notice {
  max-width: 440px;
  margin: 0 auto 28px;
  padding: 16px 18px;
  border: 1px solid var(--color-sage-line);
  border-radius: 2px;
  font-size: 16px;
  text-align: left;
}
.rsvp-notice--success {
  border-color: var(--color-sage);
  background: var(--color-sage-tint);
  color: var(--color-sage-dark);
}
.rsvp-notice--error {
  border-color: #a25d4a;
  background: #f7eae6;
  color: #7a3f2f;
}

/* -------------------------------------------------
   6. Footer
   ------------------------------------------------- */
.site-footer {
  padding: 48px 0 64px;
  text-align: center;
}
.site-footer__names {
  font-family: var(--font-script);
  font-size: 34px;
  color: var(--color-sage);
  margin: 0;
}
.site-footer__year {
  font-family: var(--font-script);
  font-size: 24px;
  color: var(--color-sage);
  margin: 4px 0 0;
}

/* -------------------------------------------------
   7. Hero entrance — one quiet reveal on page load.
   Each hero element sets --reveal-order (0, 1, 2…) inline; this is
   the only animation on the site, deliberately, so it reads as a
   considered moment rather than decoration scattered everywhere.
   ------------------------------------------------- */
@keyframes hero-reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-reveal {
  animation: hero-reveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(var(--reveal-order, 0) * 0.12s);
}

/* -------------------------------------------------
   8. Small screens
   ------------------------------------------------- */
@media (max-width: 480px) {
  body { font-size: 17px; }
  .site-header { padding: 48px 0 40px; }
  .site-section { padding: 48px 0; }
}

/* -------------------------------------------------
   9. Reduced motion
   ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wedding-rsvp-form .rsvp-attend-option,
  .wedding-rsvp-form .rsvp-submit,
  a { transition: none; }
  .hero-reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
