/* ==========================================================================
   Abdelrahman & Tia Engagement Theme — Main Stylesheet
   ========================================================================== */

:root {
    --ate-navy: #1a2747;
    --ate-navy-deep: #0f1a35;
    --ate-dusty-blue: #8aa9c4;
    --ate-dusty-blue-light: #b8cfdf;
    --ate-beige: #f0e6d2;
    --ate-beige-light: #faf6ec;
    --ate-gold: #c9a961;
    --ate-gold-deep: #a8893f;
    --ate-white: #ffffff;
    --ate-ink: #1a2747;
    --ate-error: #b91c1c;
    --ate-success: #166534;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 300;
    color: var(--ate-ink);
    line-height: 1.7;
    background: var(--ate-beige-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--ate-navy); text-decoration: none; }
a:hover { color: var(--ate-gold-deep); }

.screen-reader-text {
    border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
    height: 1px; margin: -1px; overflow: hidden; padding: 0;
    position: absolute !important; width: 1px; word-wrap: normal !important;
}

.skip-link {
    position: absolute; top: -100px; left: 8px; z-index: 999;
    background: var(--ate-navy); color: var(--ate-white);
    padding: 12px 16px; text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* ==========================================================================
   Navigation
   ========================================================================== */

.ate-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 20px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(26, 39, 71, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(201, 169, 97, 0.3);
}

.ate-nav__logo {
    font-family: 'Allura', cursive;
    font-size: 32px;
    color: var(--ate-gold);
    letter-spacing: 1px;
    text-decoration: none;
}
.ate-nav__logo:hover { color: var(--ate-gold); }

.ate-nav__menu {
    display: flex;
    list-style: none;
    gap: 36px;
    margin: 0;
    padding: 0;
}

.ate-nav__menu a {
    color: var(--ate-white);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 400;
    transition: color 0.3s;
}
.ate-nav__menu a:hover { color: var(--ate-gold); }

.ate-nav__rsvp-btn {
    background: var(--ate-gold);
    color: var(--ate-navy) !important;
    padding: 10px 24px;
    border-radius: 2px;
    font-weight: 500 !important;
    transition: all 0.3s;
}
.ate-nav__rsvp-btn:hover {
    background: var(--ate-gold-deep);
    color: var(--ate-white) !important;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.ate-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--ate-white);
    padding: 80px 20px;
}

.ate-hero__content { max-width: 800px; }

.ate-hero__eyebrow {
    font-size: 13px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--ate-gold);
    margin-bottom: 30px;
    font-weight: 400;
}

.ate-hero__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}
.ate-hero__divider::before,
.ate-hero__divider::after {
    content: '';
    width: 80px;
    height: 1px;
    background: var(--ate-gold);
}

.ate-hero__divider-icon {
    width: 8px; height: 8px;
    background: var(--ate-gold);
    transform: rotate(45deg);
}

.ate-hero__names {
    font-family: 'Allura', cursive;
    font-size: 96px;
    line-height: 1;
    font-weight: 400;
    margin: 20px 0;
    color: var(--ate-white);
    white-space: nowrap;
}

.ate-hero__amp {
    color: var(--ate-gold);
    font-size: 96px;
    display: inline-block;
    margin: 0 10px;
}

.ate-hero__subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-style: italic;
    font-weight: 300;
    margin: 30px 0 40px;
    color: var(--ate-beige);
}

.ate-hero__date {
    font-size: 14px;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 50px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.ate-btn-primary {
    display: inline-block;
    background: var(--ate-gold);
    color: var(--ate-navy);
    padding: 16px 50px;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid var(--ate-gold);
    cursor: pointer;
}
.ate-btn-primary:hover {
    background: transparent;
    color: var(--ate-gold);
}

.ate-btn-secondary {
    display: inline-block;
    margin-top: 30px;
    background: transparent;
    color: var(--ate-navy);
    padding: 14px 40px;
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
    border: 1px solid var(--ate-navy);
    transition: all 0.3s;
}
.ate-btn-secondary:hover {
    background: var(--ate-navy);
    color: var(--ate-white);
}

.ate-btn-rsvp-large {
    display: inline-block;
    background: var(--ate-gold);
    color: var(--ate-navy);
    padding: 22px 70px;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 5px;
    text-transform: uppercase;
    font-weight: 500;
    border: 2px solid var(--ate-gold);
    transition: all 0.3s;
    cursor: pointer;
    font-family: inherit;
    margin-top: 20px;
}
.ate-btn-rsvp-large:hover:not(:disabled) {
    background: transparent;
    color: var(--ate-gold);
}
.ate-btn-rsvp-large:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ate-btn-loading { display: none; }
.ate-btn-rsvp-large.is-loading .ate-btn-text { display: none; }
.ate-btn-rsvp-large.is-loading .ate-btn-loading { display: inline; }

/* ==========================================================================
   Countdown
   ========================================================================== */

.ate-countdown {
    background: var(--ate-navy);
    color: var(--ate-white);
    padding: 60px 20px;
    text-align: center;
}

.ate-countdown__grid {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.ate-countdown__item { min-width: 100px; }

.ate-countdown__number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 56px;
    font-weight: 300;
    color: var(--ate-gold);
    line-height: 1;
}

.ate-countdown__label {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 8px;
    color: var(--ate-dusty-blue-light);
}

/* ==========================================================================
   Section structure
   ========================================================================== */

.ate-section {
    padding: 120px 20px;
}

.ate-section__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.ate-section__header {
    text-align: center;
    margin-bottom: 80px;
}

.ate-section__eyebrow {
    font-size: 12px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--ate-gold-deep);
    margin-bottom: 20px;
    font-weight: 400;
}

.ate-section__title {
    font-family: 'Allura', cursive;
    font-size: 80px;
    color: var(--ate-navy);
    font-weight: 400;
    line-height: 1.1;
    margin: 0;
}

.ate-section__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 24px auto 0;
}
.ate-section__divider::before,
.ate-section__divider::after {
    content: '';
    width: 60px;
    height: 1px;
    background: var(--ate-gold);
}

.ate-section__divider-icon {
    width: 6px; height: 6px;
    background: var(--ate-gold);
    transform: rotate(45deg);
}

/* ==========================================================================
   Venue
   ========================================================================== */

.ate-venue { background: var(--ate-white); }

.ate-venue__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.ate-venue__map {
    height: 500px;
    border: 8px solid var(--ate-white);
    box-shadow: 0 20px 60px rgba(26, 39, 71, 0.15);
    overflow: hidden;
}

.ate-venue__map iframe {
    width: 100%; height: 100%;
    border: 0; display: block;
    filter: saturate(0.85);
}

.ate-venue__name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 42px;
    font-weight: 400;
    color: var(--ate-navy);
    margin: 0 0 8px;
}

.ate-venue__hall {
    font-style: italic;
    color: var(--ate-gold-deep);
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    margin-bottom: 30px;
}

.ate-venue__detail {
    display: flex;
    gap: 20px;
    margin: 24px 0;
    padding: 20px 0;
    border-bottom: 1px solid var(--ate-dusty-blue-light);
}
.ate-venue__detail:last-of-type { border-bottom: none; }

.ate-venue__detail-icon {
    width: 40px; height: 40px;
    border: 1px solid var(--ate-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--ate-gold-deep);
    font-size: 16px;
}

.ate-venue__detail-label {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--ate-dusty-blue);
    margin-bottom: 4px;
}

.ate-venue__detail-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    color: var(--ate-navy);
    font-weight: 500;
}

/* ==========================================================================
   Dress Code
   ========================================================================== */

.ate-dresscode {
    background: var(--ate-navy);
    color: var(--ate-white);
    text-align: center;
}

.ate-dresscode .ate-section__title { color: var(--ate-white); }
.ate-dresscode .ate-section__eyebrow { color: var(--ate-gold); }

.ate-dresscode__content { max-width: 700px; margin: 0 auto; }

.ate-dresscode__main {
    font-family: 'Cormorant Garamond', serif;
    font-size: 48px;
    font-style: italic;
    color: var(--ate-gold);
    margin: 30px 0;
    font-weight: 300;
}

.ate-dresscode__desc {
    font-size: 16px;
    line-height: 2;
    color: var(--ate-dusty-blue-light);
    margin-bottom: 0;
    font-weight: 300;
}

/* ==========================================================================
   RSVP Section
   ========================================================================== */

.ate-rsvp {
    color: var(--ate-white);
    text-align: center;
    padding: 140px 20px;
    /* Background is set inline from front-page.php so it can use the theme URI. */
}

.ate-rsvp .ate-section__title { color: var(--ate-white); }
.ate-rsvp .ate-section__eyebrow { color: var(--ate-gold); }

.ate-rsvp__message {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 22px;
    max-width: 600px;
    margin: 0 auto 40px;
    color: var(--ate-beige);
    font-weight: 300;
    line-height: 1.6;
}

.ate-rsvp__deadline {
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--ate-gold);
    margin-bottom: 40px;
}

.ate-rsvp__closed {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    border: 1px solid rgba(201, 169, 97, 0.3);
    color: var(--ate-beige);
    font-style: italic;
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
}

/* ==========================================================================
   RSVP Form
   ========================================================================== */

.ate-rsvp__form {
    max-width: 540px;
    margin: 0 auto;
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border: 1px solid rgba(201, 169, 97, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ate-rsvp__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px; height: 1px;
    overflow: hidden;
}

.ate-form-row { margin-bottom: 22px; }

.ate-form-row label {
    display: block;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ate-gold);
    margin-bottom: 8px;
    font-weight: 400;
}

.ate-form-row .required { color: var(--ate-gold); }

.ate-form-row input[type="text"],
.ate-form-row input[type="email"],
.ate-form-row select,
.ate-form-row textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(184, 207, 223, 0.3);
    color: var(--ate-white);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s, background 0.3s;
}

.ate-form-row input:focus,
.ate-form-row select:focus,
.ate-form-row textarea:focus {
    outline: none;
    border-color: var(--ate-gold);
    background: rgba(255, 255, 255, 0.12);
}

.ate-form-row textarea { resize: vertical; min-height: 80px; }

.ate-form-row select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23c9a961' d='M6 8L0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.ate-form-row select option {
    background: var(--ate-navy);
    color: var(--ate-white);
}

.ate-radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.ate-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 200px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(184, 207, 223, 0.3);
    cursor: pointer;
    transition: all 0.3s;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-size: 14px !important;
    color: var(--ate-white) !important;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    margin-bottom: 0 !important;
}

.ate-radio:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--ate-gold);
}

.ate-radio input[type="radio"] {
    margin: 0;
    accent-color: var(--ate-gold);
    width: 16px; height: 16px;
}

.ate-radio:has(input:checked) {
    background: rgba(201, 169, 97, 0.15);
    border-color: var(--ate-gold);
}

.ate-form-feedback {
    min-height: 24px;
    margin: 16px 0;
    text-align: center;
    font-size: 14px;
    color: #fca5a5;
    font-style: italic;
}

.ate-form-feedback:empty { display: none; }

/* Hide attending-only fields when not attending */
.ate-rsvp__form.is-not-attending .ate-attending-only { display: none; }

/* ==========================================================================
   RSVP Success State
   ========================================================================== */

.ate-rsvp__success {
    max-width: 500px;
    margin: 0 auto;
    padding: 50px 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(201, 169, 97, 0.4);
    text-align: center;
}

.ate-rsvp__success-icon {
    width: 60px; height: 60px;
    margin: 0 auto 24px;
    background: var(--ate-gold);
    color: var(--ate-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(45deg);
    font-size: 24px;
}
.ate-rsvp__success-icon::before {
    content: '◆';
    transform: rotate(-45deg);
}

.ate-rsvp__success-message {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-style: italic;
    color: var(--ate-beige);
    line-height: 1.6;
    margin: 0;
    white-space: pre-line;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.ate-footer {
    background: var(--ate-navy-deep);
    color: var(--ate-dusty-blue-light);
    text-align: center;
    padding: 50px 20px;
    font-size: 12px;
    letter-spacing: 2px;
}

.ate-footer__names {
    font-family: 'Allura', cursive;
    font-size: 42px;
    color: var(--ate-gold);
    margin-bottom: 10px;
    letter-spacing: 0;
}

.ate-footer__divider {
    width: 60px;
    height: 1px;
    background: var(--ate-gold);
    margin: 20px auto;
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.ate-404 {
    min-height: 100vh;
    background: var(--ate-navy);
    color: var(--ate-white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px;
}

.ate-404__inner { max-width: 600px; }

.ate-404__eyebrow {
    font-size: 13px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--ate-gold);
    margin-bottom: 30px;
}

.ate-404__title {
    font-family: 'Allura', cursive;
    font-size: 80px;
    margin: 0 0 30px;
    line-height: 1.1;
}

.ate-404__message {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-style: italic;
    color: var(--ate-beige);
    margin-bottom: 40px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .ate-nav { padding: 15px 20px; }
    .ate-nav__menu { gap: 16px; }
    .ate-nav__menu a { font-size: 10px; letter-spacing: 1px; }
    .ate-nav__rsvp-btn { padding: 8px 16px; }

    .ate-hero { padding: 100px 20px 60px; }
    .ate-hero__names { font-size: 56px; white-space: normal; }
    .ate-hero__amp { font-size: 64px; margin: 0 4px; }
    .ate-hero__subtitle { font-size: 18px; }

    .ate-section { padding: 80px 20px; }
    .ate-section__title { font-size: 56px; }
    .ate-section__header { margin-bottom: 50px; }

    .ate-venue__grid { grid-template-columns: 1fr; gap: 40px; }
    .ate-venue__map { height: 320px; }
    .ate-venue__name { font-size: 32px; }

    .ate-countdown__grid { gap: 20px; }
    .ate-countdown__number { font-size: 40px; }
    .ate-countdown__item { min-width: 70px; }

    .ate-dresscode__main { font-size: 32px; }

    .ate-rsvp { padding: 80px 20px; }
    .ate-rsvp__form { padding: 24px; }
    .ate-rsvp__message { font-size: 18px; }

    .ate-radio-group { flex-direction: column; gap: 8px; }
    .ate-radio { min-width: 0; }

    .ate-btn-rsvp-large {
        padding: 18px 40px;
        font-size: 12px;
        letter-spacing: 3px;
    }

    .ate-footer__names { font-size: 32px; }
    .ate-404__title { font-size: 56px; }
}

@media (max-width: 420px) {
    .ate-nav { padding: 12px 14px; }
    .ate-nav__logo { font-size: 26px; }
    .ate-nav__menu { gap: 10px; }
    .ate-hero__names { font-size: 44px; }
    .ate-hero__amp { font-size: 52px; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

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