/* =================================================================
   Poff & Dariya — Retro OS Theme
   A Classic Mac OS 8 / Windows 95 inspired wedding site.
   ================================================================= */

/* ---------- Fonts -------------------------------------------------
   Mondwest = serif display font (headings)
   Neue Bit = pixel sans-serif (UI + body)
   Folder names contain spaces, so they are %20 encoded below.
------------------------------------------------------------------ */
@font-face {
    font-family: "Mondwest";
    src:
        url("../fonts/Mondwest%20-%20Full%20Family/Mondwest-Regular.woff2")
            format("woff2"),
        url("../fonts/Mondwest%20-%20Full%20Family/Mondwest-Regular.woff")
            format("woff");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Mondwest";
    src:
        url("../fonts/Mondwest%20-%20Full%20Family/Mondwest-Bold.woff2")
            format("woff2"),
        url("../fonts/Mondwest%20-%20Full%20Family/Mondwest-Bold.woff")
            format("woff");
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: "NeueBit";
    src:
        url("../fonts/Neuebit-Full%20family/PPNeueBit-Regular.woff2")
            format("woff2"),
        url("../fonts/Neuebit-Full%20family/PPNeueBit-Regular.woff")
            format("woff");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "NeueBit";
    src:
        url("../fonts/Neuebit-Full%20family/PPNeueBit-Bold.woff2")
            format("woff2"),
        url("../fonts/Neuebit-Full%20family/PPNeueBit-Bold.woff") format("woff");
    font-weight: 700;
    font-display: swap;
}

/* ---------- Config / Design tokens -------------------------------
   Swap the two background colors here if the wallpaper changes.
------------------------------------------------------------------ */
:root {
    /* Color palette (easy to reconfigure) */
    --bg-color-1: #54b3da; /* greenish blue */
    --bg-color-2: #b3b3da; /* purple */
    --bg-color-3: #c76b6b; /* dusty red — accent for the header animation */

    /* Surfaces */
    --window-bg: #ffffff;
    --ink: #000000;
    --muted: #555555;

    /* Chrome / bevels */
    --chrome: #ffffff;
    --bevel-light: #ffffff;
    --bevel-dark: #808080;

    /* Type */
    --font-display: "Mondwest", Georgia, serif;
    --font-ui: "NeueBit", "Courier New", monospace;

    /* Metrics */
    --border-width: 2px;
    --menubar-height: 24px;
    --dock-icon: 52px;
    --window-max: 640px;
}

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

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: var(--font-ui);
    font-weight: bold;
    font-size: 20px;
    line-height: 1.4;
    color: var(--ink);

    /* Tiled pattern layered over a two-tone gradient */
    background-color: var(--bg-color-1);
    background-image:
        url("../images/bg-a35130eacff9b03971202d418f28ddbb.png?vsn=d"),
        linear-gradient(135deg, var(--bg-color-1) 0%, var(--bg-color-2) 100%);
    background-repeat: repeat, no-repeat;
    background-attachment: fixed, fixed;
    background-size:
        8px, cover; /* 8px tile (half of natural 16) keeps the pattern subtle */

    /* Leave room for the fixed menu bar (top) and dock (bottom) */
    padding-top: var(--menubar-height);
    padding-bottom: 120px;
    -webkit-font-smoothing: none; /* keep pixel fonts crisp */
}

/* ---------- Top menu bar ------------------------------------------ */
.menubar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--menubar-height);
    z-index: 9000;

    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 12px;

    background: var(--chrome);
    border-bottom: var(--border-width) solid var(--ink);
    box-shadow: inset 0 1px 0 var(--bevel-light);
    font-size: 16px;
}

.menubar .menu-item {
    cursor: default;
}
.menubar .apple {
    position: relative;
    top: 3px;
    font-weight: 700;
}
.menubar .spacer {
    flex: 1;
}
.menubar .clock {
    font-variant-numeric: tabular-nums;
}

/* ---------- Desktop / layout -------------------------------------- */
.desktop {
    min-height: calc(100vh - var(--menubar-height) - 120px);
    display: flex;
    justify-content: center;
    padding: var(--desktop-top, 6vh) 16px 0;
}

body.subpage {
    --desktop-top: 16vh;
}

/* ---------- Classic Mac OS window --------------------------------- */
.window {
    width: 100%;
    max-width: var(--window-max);
    height: fit-content;
    background: var(--window-bg);
    border: var(--border-width) solid var(--ink);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}

/* Title bar with the classic pinstripe lines */
.title-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 26px;
    padding: 0 8px;
    border-bottom: var(--border-width) solid var(--ink);
    background: repeating-linear-gradient(
        to bottom,
        var(--ink) 0,
        var(--ink) 1px,
        var(--window-bg) 1px,
        var(--window-bg) 3px
    );
}

/* Hollow square "close box" on the left */
.title-bar .close-box {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    background: var(--window-bg);
    border: 2px solid var(--ink);
    padding: 0;
    cursor: pointer;
}
.title-bar .close-box:active {
    background: var(--ink);
}

/* Title sits in a white "notch" so it reads over the stripes */
.title-bar .title-bar-text {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 17px;
    line-height: 1;
    padding: 3px 10px;
    background: var(--window-bg);
    white-space: nowrap;
    margin: 0 auto;
}

.window-body {
    padding: 28px 32px 34px;
}

/* ---------- Typography -------------------------------------------- */
h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1;
    margin: 0 0 0.4em;
}
h1 {
    font-size: 56px;
}
h2 {
    font-size: 34px;
}
h3 {
    font-size: 26px;
}

/* Fades text between the two wallpaper colors. Reusable: add
   class="color-fade" to any element (used on the homepage h1). */
@keyframes textColorFade {
    0% {
        color: var(--bg-color-1);
    }
    33% {
        color: var(--bg-color-2);
    }
    66% {
        color: var(--bg-color-3);
    }
    100% {
        color: var(--bg-color-1);
    }
}
.color-fade {
    animation: textColorFade 4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
    .color-fade {
        animation: none;
    }
}

p {
    margin: 0 0 1em;
}
a {
    color: #0000cc;
}

.subtitle {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--muted);
}

.center {
    text-align: center;
}

/* Inset/sunken panel — handy for embeds and gallery cells */
.inset {
    background: var(--chrome);
    border: var(--border-width) solid var(--ink);
    box-shadow: inset 1px 1px 0 var(--bevel-dark);
    padding: 16px;
}

/* ---------- Photo gallery grid ------------------------------------ */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}
.gallery .photo {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: inherit;
    font-size: 15px;
    color: var(--muted);
    background: var(--chrome);
    border: var(--border-width) solid var(--ink);
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.1s ease;
}
.gallery .photo:hover {
    transform: translateY(-2px);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}
.gallery .photo:active {
    transform: translateY(0);
}
.gallery .photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- Pop-up photo windows ---------------------------------- */
.photo-window {
    position: fixed;
    top: 0;
    left: 0;
    width: fit-content;
    max-width: min(80vw, 520px);
    background: var(--window-bg);
    border: var(--border-width) solid var(--ink);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
    z-index: 200;
    touch-action: none; /* allow pointer-drag on touch devices */
}
.photo-window .title-bar {
    cursor: grab;
}
.photo-window.dragging .title-bar {
    cursor: grabbing;
}
.photo-window-body {
    padding: 5px;
    background: var(--window-bg);
}
.photo-window-body img {
    display: block;
    max-width: min(80vw, 510px);
    max-height: 68vh;
    width: auto;
    height: auto;
}

/* Responsive iframe wrapper (Spotify embed) */
.embed {
    width: 100%;
}
.embed iframe {
    display: block;
    width: 100%;
    border: 0;
}

/* ---------- Bottom dock ------------------------------------------- */
.dock {
    background: var(--window-bg);
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 9000;

    display: flex;
    align-items: flex-end;
    gap: 14px;
    padding: 10px 16px;

    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border: var(--border-width) solid var(--ink);
    border-radius: 14px;
    box-shadow:
        inset 0 1px 0 var(--bevel-light),
        4px 4px 0 rgba(0, 0, 0, 0.25);
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--ink);
    transition: transform 0.12s ease;
}

.dock-item img {
    width: var(--dock-icon);
    height: var(--dock-icon);
    image-rendering: pixelated; /* keep retro icons crisp when scaled */
    transition: transform 0.12s ease;
}

.dock-item .dock-label {
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.dock-item:hover img {
    transform: translateY(-8px) scale(1.18);
}
.dock-item:hover .dock-label {
    opacity: 1;
}

/* Current page gets a permanent label + a little indicator dot */
.dock-item.active .dock-label {
    opacity: 1;
}
.dock-item.active::after {
    content: "";
    width: 4px;
    height: 4px;
    background: var(--ink);
    border-radius: 50%;
    margin-top: 1px;
}

/* ---------- Schedule / timeline ----------------------------------- */
.schedule-hero {
    padding-bottom: 24px;
    border-bottom: var(--border-width) solid var(--ink);
    margin-bottom: 0;
}

.schedule-eyebrow {
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 8px;
}

.tl-day {
    padding-top: 20px;
}

.tl-day + .tl-day {
    border-top: var(--border-width) solid var(--ink);
    margin-top: 4px;
}

.tl-day-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.tl-day-tag {
    font-size: 14px;
    font-weight: 700;
    color: var(--window-bg);
    background: var(--ink);
    padding: 2px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.tl-day-date {
    font-size: 18px;
    color: var(--muted);
    white-space: nowrap;
}

.tl-day-rule {
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(
        90deg,
        var(--bevel-dark) 0px, var(--bevel-dark) 4px,
        transparent 4px, transparent 8px
    );
}

.tl-list {
    display: flex;
    flex-direction: column;
}

.tl-item {
    display: grid;
    grid-template-columns: 82px 16px 1fr;
    gap: 0 10px;
}

.tl-time {
    font-size: 17px;
    color: var(--muted);
    text-align: right;
    padding-top: 3px;
    line-height: 1.2;
}

.tl-stem-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tl-dot {
    width: 10px;
    height: 10px;
    background: var(--ink);
    transform: rotate(45deg);
    flex-shrink: 0;
    margin-top: 5px;
}

.tl-item.tl-optional .tl-dot {
    background: var(--window-bg);
    border: 2px solid var(--muted);
}

.tl-item.tl-free .tl-dot {
    background: var(--window-bg);
    border: 2px dashed var(--muted);
}

.tl-stem {
    flex: 1;
    width: 2px;
    min-height: 20px;
    margin-top: 4px;
    background: repeating-linear-gradient(
        180deg,
        var(--ink) 0px, var(--ink) 3px,
        transparent 3px, transparent 6px
    );
}

.tl-item.tl-optional .tl-stem {
    background: repeating-linear-gradient(
        180deg,
        var(--muted) 0px, var(--muted) 2px,
        transparent 2px, transparent 5px
    );
}

.tl-item:last-child .tl-stem {
    display: none;
}

.tl-content {
    padding-bottom: 16px;
}

.tl-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 4px;
}

.tl-event-name {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
}

.tl-badge {
    font-size: 13px;
    font-weight: 700;
    padding: 1px 5px;
    border: var(--border-width) solid var(--ink);
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    top: 3px;
}

.tl-badge-required {
    background: var(--ink);
    color: var(--window-bg);
}

.tl-badge-optional {
    background: var(--window-bg);
    color: var(--muted);
    border-color: var(--muted);
}

.tl-badge-free {
    background: var(--window-bg);
    color: var(--muted);
    border: var(--border-width) dashed var(--muted);
}

.tl-location {
    font-size: 17px;
    color: var(--muted);
    margin: 0 0 4px;
}

.tl-location a {
    color: var(--muted);
    text-decoration: underline;
    text-decoration-style: dotted;
}

.tl-location a:hover {
    color: var(--ink);
}

.tl-desc {
    font-size: 19px;
    color: var(--ink);
    margin: 0 0 4px;
    max-width: 420px;
}

.tl-note {
    font-size: 16px;
    color: var(--muted);
    display: block;
}

.tl-item.tl-free .tl-content {
    border: var(--border-width) dashed var(--bevel-dark);
    padding: 10px 12px;
    margin-bottom: 16px;
}

.tl-item.tl-free .tl-event-name {
    color: var(--muted);
}

.tl-item.tl-free .tl-desc {
    color: var(--muted);
}

/* ── Dress-code popover ── */
.dc-wrap {
    position: relative;
    display: inline-block;
}

.dc-trigger {
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    color: var(--muted);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}
.dc-trigger:hover,
.dc-trigger[aria-expanded="true"] {
    color: var(--ink);
}

.dc-popover {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 500;
    width: max-content;
    max-width: min(340px, 86vw);
    background: var(--window-bg);
    border: var(--border-width) solid var(--ink);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
    text-align: left;
}

@media (prefers-reduced-motion: no-preference) {
    .dc-popover:not([hidden]) {
        animation: dcPop 0.12s ease-out;
    }
}
@keyframes dcPop {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pinstripe title bar, matching the Classic Mac OS windows */
.dc-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 24px;
    padding: 0 6px;
    border-bottom: var(--border-width) solid var(--ink);
    background: repeating-linear-gradient(
        to bottom,
        var(--ink) 0,
        var(--ink) 1px,
        var(--window-bg) 1px,
        var(--window-bg) 3px
    );
}

.dc-close {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
    background: var(--window-bg);
    border: 2px solid var(--ink);
    padding: 0;
    cursor: pointer;
}
.dc-close:active {
    background: var(--ink);
}

.dc-title {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    padding: 3px 8px;
    background: var(--window-bg);
    white-space: nowrap;
    margin: 0 auto;
}

.dc-body {
    padding: 12px 14px 14px;
    font-size: 16px;
    line-height: 1.45;
    color: var(--ink);
}
.dc-body p {
    margin: 0 0 10px;
}
.dc-body p:last-child {
    margin-bottom: 0;
}
.dc-subhead {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 2px;
}

/* ── Status bar (bottom of schedule window) ── */
.statusbar {
    border-top: var(--border-width) solid var(--ink);
    padding: 4px 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
}

/* ---------- Small screens ----------------------------------------- */
@media (max-width: 600px) {
    body {
        font-size: 18px;
    }
    h1 {
        font-size: 42px;
    }
    body {
        --desktop-top: 4vh;
    }
    body.subpage {
        --desktop-top: 10vh;
    }
    .window-body {
        padding: 20px;
    }
    :root {
        --dock-icon: 44px;
    }
}

/* ---------- Login gate -------------------------------------------- */
body.gate {
    /* Plain white — no wallpaper on the gate */
    background: var(--window-bg);
    background-image: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.gate-box {
    text-align: center;
    padding: 24px;
}
.gate-title {
    font-family: var(--font-display);
    color: var(--ink);
    font-size: clamp(44px, 12vw, 76px);
    margin: 0 0 28px;
}
.gate-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.gate-input {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 20px;
    text-align: center;
    width: min(82vw, 280px);
    padding: 8px 12px;
    color: var(--ink);
    background: var(--window-bg);
    border: var(--border-width) solid var(--ink);
    box-shadow: inset 1px 1px 0 var(--bevel-dark);
}
.gate-input:focus {
    outline: none;
}
.gate-button {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 18px;
    padding: 6px 28px;
    cursor: pointer;
    color: var(--ink);
    background: var(--chrome);
    border: var(--border-width) solid var(--ink);
    box-shadow:
        inset 0 1px 0 var(--bevel-light),
        2px 2px 0 rgba(0, 0, 0, 0.3);
}
.gate-button:active {
    transform: translate(1px, 1px);
    box-shadow: inset 1px 1px 0 var(--bevel-dark);
}
.gate-error {
    color: #cc0000;
    font-weight: 700;
    margin: 4px 0 0;
}

/* Shake the form on a wrong password. */
@keyframes gateShake {
    0%,
    100% {
        transform: translateX(0);
    }
    20%,
    60% {
        transform: translateX(-6px);
    }
    40%,
    80% {
        transform: translateX(6px);
    }
}
.gate-form.shake {
    animation: gateShake 0.4s ease;
}
@media (prefers-reduced-motion: reduce) {
    .gate-form.shake {
        animation: none;
    }
}

/* ---------- Home: stacked windows --------------------------------- */
/* The home page stacks the intro window and the subscribe window. */
.home-stack {
    width: 100%;
    max-width: var(--window-max);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* ---------- Home page photo ---------------------------------------- */
.home-photo {
    width: 100%;
    max-width: 420px;
    border-radius: 4px;
    margin-bottom: 16px;
}

/* ---------- Newsletter subscribe form ----------------------------- */
.subscribe-form {
    margin-top: 6px;
}
.subscribe-fields {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}
.subscribe-input {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 20px;
    flex: 1 1 220px;
    max-width: 320px;
    padding: 8px 12px;
    color: var(--ink);
    background: var(--window-bg);
    border: var(--border-width) solid var(--ink);
    box-shadow: inset 1px 1px 0 var(--bevel-dark);
}
.subscribe-input:focus {
    outline: none;
}
.subscribe-button {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 18px;
    padding: 6px 28px;
    cursor: pointer;
    color: var(--ink);
    background: var(--chrome);
    border: var(--border-width) solid var(--ink);
    box-shadow:
        inset 0 1px 0 var(--bevel-light),
        2px 2px 0 rgba(0, 0, 0, 0.3);
}
.subscribe-button:active {
    transform: translate(1px, 1px);
    box-shadow: inset 1px 1px 0 var(--bevel-dark);
}
.subscribe-status {
    margin: 0;
    font-weight: 700;
}
