/*
 * Typography and palette lifted from the couple's Knot site
 * (theknot.com/us/kaeley-vera-and-nathaniel-smith-sep-2027).
 *
 * Their theme uses EB Garamond throughout — weight 500 uppercase with wide
 * tracking for headings, 400 italic for navigation and body copy — on ink
 * #333234 over a fixed watercolour wash with a #d4dee3 ground.
 * Sizes and letter-spacings below are the exact values from their CSS.
 */

:root {
    --ink: #333234;
    --ground: #d4dee3;
    --panel: rgba(255, 255, 255, 0.82);
    --panel-solid: #ffffff;
    --rule: rgba(51, 50, 52, 0.18);

    --serif: 'EB Garamond', Garamond, Georgia, 'Times New Roman', serif;

    /* Knot type scale */
    --fs-hero: 56px;
    --fs-display: 42px;
    --fs-title: 32px;
    --fs-subtitle: 21px;
    --fs-eyebrow: 19px;
    --fs-body: 17px;
}

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

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

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background-color: var(--ground);
    font-family: var(--serif);
    font-size: var(--fs-body);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}

/* Fixed watercolour wash behind everything, as on the Knot site. */
/*
 * The Knot swaps the wash at 768px: a tall portrait crop on phones, a wide
 * one on desktop. Same breakpoint, same two images.
 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: url('/img/theme/page-bg.jpg');
    background-color: var(--ground);
    background-position: top center;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (min-width: 768px) {
    body::before { background-image: url('/img/theme/page-bg-wide-lg.jpg'); }
}

@media (min-width: 1280px) {
    body::before { background-image: url('/img/theme/page-bg-wide.jpg'); }
}

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

a { color: inherit; }

/* ---------- header ---------- */

.site-header {
    background: transparent;
    border: 0;
    padding: 1.25rem 1.25rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.monogram {
    font-family: var(--serif);
    font-size: var(--fs-subtitle);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--ink);
    text-decoration: none;
    line-height: 1;
}

.monogram span { font-style: italic; letter-spacing: 1px; }

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0 0.5rem;
}

/* Knot nav: EB Garamond italic 17px, 2px tracking, 2px underline on active */
.site-nav > a,
.nav-dropdown-toggle {
    font-family: var(--serif);
    font-size: var(--fs-body);
    font-weight: 400;
    font-style: italic;
    letter-spacing: 2px;
    line-height: 1;
    color: var(--ink);
    text-decoration: none;
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 8px 8px 6px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    cursor: pointer;
    transition: all 0.25s;
}

.site-nav > a:hover,
.nav-dropdown-toggle:hover { border-bottom-color: var(--rule); }

.site-nav > a.is-active,
.nav-dropdown.is-active > .nav-dropdown-toggle { border-bottom-color: var(--ink); }

/* ---------- documents dropdown ---------- */

.nav-dropdown { position: relative; }

.caret { font-style: normal; font-size: 0.7em; letter-spacing: 0; }

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 14rem;
    background: var(--panel-solid);
    border: 1px solid var(--rule);
    box-shadow: 0 10px 30px rgba(51, 50, 52, 0.14);
    padding: 0.35rem 0;
    z-index: 40;
}

.nav-dropdown-menu[hidden] { display: none; }

.nav-dropdown-menu a {
    display: block;
    padding: 0.6rem 1.2rem;
    font-family: var(--serif);
    font-size: var(--fs-body);
    font-style: italic;
    letter-spacing: 1px;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover { background: rgba(51, 50, 52, 0.08); }
.nav-dropdown-menu a.is-active { font-weight: 500; }

/* ---------- main ---------- */

main {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 2.5rem 1.25rem 3.5rem;
}

main.main-hero { display: block; padding: 0; }

/* ---------- masthead (home) ---------- */

/*
 * The Knot runs a deep column of watercolour above the names — padding-top
 * steps 220px down to 100px as the viewport narrows. Reproduced here.
 */
.masthead {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 220px 20px 0;
}

/* 56px / weight 500 / uppercase / 4px tracking — the Knot's exact values */
.names {
    font-family: var(--serif);
    font-size: var(--fs-hero);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 4px;
    line-height: 1;
    color: var(--ink);
    margin: 16px auto;
    padding-bottom: 10px;
}

.amp { font-style: italic; text-transform: none; letter-spacing: 1px; }

/* 19px / weight 500 / uppercase / 2px tracking / 22px line-height */
.masthead-line,
.countdown {
    font-family: var(--serif);
    font-size: var(--fs-eyebrow);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 22px;
    margin: 8px 0;
}

@media (max-width: 1280px) { .masthead { padding-top: 200px; } }
@media (max-width: 1024px) { .masthead { padding-top: 180px; } }
@media (max-width: 900px)  { .masthead { padding-top: 140px; } }
@media (max-width: 768px)  { .masthead { padding-top: 120px; } }
@media (max-width: 640px) {
    .masthead { padding-top: 100px; }
    .names { font-size: calc(56px * 0.75); letter-spacing: 2px; }
}
@media (max-width: 393px) { .masthead { padding-top: 90px; } }

/* ---------- home photo + ceremony ---------- */

/* Knot: max-width 1250px, centred, object-fit cover */
.home-photo {
    max-width: 1250px;
    margin: 1.5rem auto 0;
    padding: 0 20px;
    width: 100%;
}

.home-photo img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.ceremony {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 20px 1rem;
    text-align: center;
}

/* 32px / weight normal / uppercase / 3px tracking */
.ceremony-date {
    font-family: var(--serif);
    font-size: var(--fs-title);
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1;
    margin: 32px 0 8px;
}

.ceremony-place {
    font-family: var(--serif);
    font-size: var(--fs-eyebrow);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 8px 0 2rem;
}

/* 21px / weight 500 / uppercase / 2px tracking */
.ceremony-heading {
    font-family: var(--serif);
    font-size: var(--fs-subtitle);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 2rem 0 0.75rem;
}

.ceremony-when,
.ceremony-venue {
    font-family: var(--serif);
    font-size: var(--fs-body);
    font-weight: 400;
    font-style: italic;
    letter-spacing: 1px;
    margin: 0 0 0.9rem;
}

.ceremony-note {
    font-family: var(--serif);
    font-size: var(--fs-body);
    font-style: italic;
    letter-spacing: 1px;
    margin: 0 0 0.4rem;
}

@media (max-width: 640px) {
    .ceremony-date { font-size: calc(32px * 0.75); }
}

.muted {
    font-family: var(--serif);
    font-size: var(--fs-body);
    font-weight: 400;
    font-style: italic;
    letter-spacing: 1px;
    text-transform: none;
}

/* ---------- content panels ---------- */

/* Knot interior pages: content sits directly on the wash, 1200px container
   with 20px gutters. Body copy is held to a 460px measure. */
.prose, .gallery-wrap, .recs-wrap {
    width: 100%;
    max-width: 1200px;
    padding: 1.5rem 20px 2rem;
}

/* Story/document copy: the Knot caps its text column at 460px. */
.prose > p,
.prose > ul,
.prose > .assign-note {
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.prose > h2,
.prose > h3 {
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

/* Knot page title: 32px, weight normal, uppercase, 3px tracking */
h1 {
    font-family: var(--serif);
    font-size: var(--fs-title);
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1;
    text-align: center;
    margin: 0 0 2rem;
}

.prose h2 {
    font-family: var(--serif);
    font-size: var(--fs-subtitle);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 2.5rem 0 0.6rem;
}

.prose h3 {
    font-family: var(--serif);
    font-size: var(--fs-eyebrow);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 1.75rem 0 0.3rem;
}

/* Body copy matches the Knot's italic serif */
.prose p {
    font-family: var(--serif);
    font-size: var(--fs-body);
    font-weight: 400;
    font-style: italic;
    letter-spacing: 1px;
    margin: 0 0 1.15rem;
}

.prose ul { margin: 0 0 1.15rem; padding-left: 1.3rem; }

.prose li {
    font-style: italic;
    letter-spacing: 1px;
    margin-bottom: 0.35rem;
}

.prose a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.prose a:hover { border-bottom-color: var(--ink); }

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

/* ---------- document pages ---------- */

.doc-badge {
    display: table;
    margin: 0 auto 1.75rem;
    font-size: 13px;
    font-style: italic;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid var(--rule);
    padding: 0.3rem 0.8rem;
}

.doc-banner { width: 100%; margin-bottom: 2rem; }

.doc-sub {
    text-align: center;
    font-family: var(--serif);
    font-size: var(--fs-eyebrow);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: -1.25rem 0 2rem;
}

.callout {
    background: rgba(212, 222, 227, 0.55);
    border-left: 2px solid var(--ink);
    padding: 1.4rem 1.6rem 0.4rem;
    margin: 2.25rem 0;
}

.callout h2 { margin-top: 0; }

.doc-signoff {
    text-align: center;
    font-style: italic;
    letter-spacing: 1px;
    margin-top: 2rem;
}

.doc-date {
    text-align: center;
    font-family: var(--serif);
    font-size: var(--fs-eyebrow);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 2.25rem;
}

/* Room/cabin tables in the guest documents */
.assign-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0 1.5rem;
}

.assign-table th,
.assign-table td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--rule);
    font-size: var(--fs-body);
}

.assign-table th {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 14px;
}

.assign-table td { font-style: italic; letter-spacing: 1px; }

.assign-note {
    font-size: 14px;
    font-style: italic;
    letter-spacing: 1px;
    text-align: center;
    margin: 0 0 1.5rem;
}

/* ---------- gallery ---------- */

/*
 * The Knot shows whole photos, not square crops: tiles cap at 370x510 with
 * 15px padding and object-fit: contain.
 */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    justify-content: center;
    gap: 0;
}

.gallery-item {
    display: block;
    margin: 0 auto;
    padding: 15px;
    width: 100%;
    max-width: 370px;
    max-height: 510px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    max-height: 480px;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.gallery-item:hover img { opacity: 0.86; }

@media (max-width: 640px) {
    .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .gallery-item { padding: 8px; }
}

/* ---------- lightbox ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(38, 38, 40, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 3.5rem 1rem;
}

.lightbox[hidden] { display: none; }

.lb-img {
    max-width: min(96vw, 1400px);
    max-height: 86vh;
    width: auto;
    object-fit: contain;
}

.lightbox button {
    position: absolute;
    background: none;
    border: 0;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    line-height: 1;
    padding: 0.5rem 0.9rem;
    font-family: var(--serif);
    transition: color 0.15s ease;
}

.lightbox button:hover { color: #fff; }

.lb-close { top: 0.75rem; right: 1rem; font-size: 2.4rem; }
.lb-prev  { left: 0.5rem;  font-size: 3rem; }
.lb-next  { right: 0.5rem; font-size: 3rem; }

.lb-count {
    position: absolute;
    bottom: 1.1rem;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-style: italic;
    letter-spacing: 2px;
    margin: 0;
}

/* ---------- recommendations ---------- */

.area-heading {
    font-family: var(--serif);
    font-size: var(--fs-subtitle);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    margin: 2.75rem 0 1.4rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rule);
}

.rec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; }

@media (min-width: 42rem) {
    .rec-list { grid-template-columns: 1fr 1fr; gap: 1.6rem 2.5rem; }
}

.rec h3 {
    font-family: var(--serif);
    font-size: var(--fs-eyebrow);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 0.3rem;
}

.rec h3 a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.rec h3 a:hover { border-bottom-color: var(--ink); }

.rec-note {
    font-size: var(--fs-body);
    font-style: italic;
    letter-spacing: 1px;
    margin: 0 0 0.4rem;
}

.rec-meta { margin: 0; font-size: 14px; font-style: italic; letter-spacing: 1px; opacity: 0.75; }
.rec-meta span { display: block; }
.rec-meta a { text-decoration: none; }

/* ---------- footer ---------- */

.site-footer {
    border-top: 1px solid var(--rule);
    background: transparent;
    padding: 1.75rem 1.25rem 2.5rem;
    text-align: center;
    max-width: 1200px;
    margin: 2rem auto 0;
    width: 100%;
}

.site-footer p {
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

.site-footer .hashtag { margin-top: 0.4rem; font-style: italic; font-weight: 400; text-transform: none; }

/* ---------- footer detail ---------- */

.footer-monogram {
    font-family: var(--serif);
    font-size: var(--fs-subtitle);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0 0 0.35rem;
}

.footer-date {
    font-family: var(--serif);
    font-size: var(--fs-body);
    font-weight: 500;
    letter-spacing: 2px;
    margin: 0;
}
