/*
 * Frederik - 1930s letterpress.
 *
 * Monochrome: rich ink on good cream stock, no colour accent at all.
 * Symmetric and centred, hairline double rules, letter-spaced Deco caps
 * for labels, a Didone for the event title, and a keyline frame around
 * the invitation card. The paper grain is an inline SVG noise filter at
 * very low opacity - no images.
 */

@font-face {
    font-family: "Josefin Sans";
    src: url("../fonts/josefin-sans-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Playfair Display";
    src: url("../fonts/playfair-display-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "EB Garamond";
    src: url("../fonts/eb-garamond-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root[data-theme="frederik"] {
    /* --- palette: ink on stock, nothing else --- */
    --paper: #faf7f1;
    --surface: #fffefb;
    --ink: #14110f;
    --ink-soft: #46403a;
    --ink-faint: #6f6862;

    --accent: #14110f;
    --accent-ink: #faf7f1;

    --link: #14110f;
    --link-hover: #6f6862;
    --focus: #6f6862;

    /* Status colours are greys, not hues - the theme stays monochrome.
       Meaning is carried by the label text, never by colour alone. */
    --ok-bg: #ebe7df;
    --ok-fg: #2c2925;
    --warn-bg: #f0ece4;
    --warn-fg: #57514a;
    --danger-bg: #e6e1d8;
    --danger-fg: #2c2925;

    --badge-bg: #eee9e0;
    --badge-fg: #46403a;
    --badge-radius: 0;
    --row-hover: #f5f1ea;

    /* --- type --- */
    --font-head: "Josefin Sans", "Century Gothic", "Futura", "Trebuchet MS", sans-serif;
    --font-display: "Playfair Display", "Bodoni MT", "Didot", Didot, Georgia, serif;
    --font-body: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --font-ui: "Josefin Sans", "Century Gothic", "Futura", "Trebuchet MS", sans-serif;

    --body-size: 1.05rem;
    --small-size: .875rem;
    --tiny-size: .72rem;
    --label-size: .74rem;
    --h1-size: 1.9rem;
    --h2-size: 1.4rem;
    --h3-size: 1.15rem;
    --brand-size: 1.15rem;

    --head-weight: 600;
    --head-spacing: .12em;
    --head-transform: uppercase;
    --brand-spacing: .2em;
    --label-spacing: .14em;
    --label-transform: uppercase;
    --display-weight: 700;
    --display-spacing: .01em;
    --display-transform: none;
    --eyebrow-spacing: .3em;

    /* --- shape: square, tight, deliberate --- */
    --radius: 0;
    --radius-sm: 0;
    --btn-radius: 0;
    --shell-width: 1040px;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 15px;
    --space-4: 24px;
    --space-5: 38px;
    --space-6: 60px;

    --rule: 1px solid #ddd6ca;
    --card-border: 1px solid #ded7cb;
    --input-border: 1px solid #c8c0b3;
    --input-bg: #fffefb;
    --btn-border: 1px solid #14110f;
    --shadow: none;

    /* --- paper grain ---
       feTurbulence at low opacity: enough tooth to read as stock, not
       enough to interfere with text. */
    --page-wash: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
    --page-wash-opacity: .045;

    /* --- invitation card --- */
    --invite-width: 560px;
    --invite-surface: #fffefb;
    --invite-border: 1px solid #14110f;
    --invite-shadow: 0 2px 0 0 #e3ddd2;
    --invite-padding: 52px 46px;
    --invite-padding-mobile: 34px 22px;
    --invite-align: center;
    --invite-title-size: 2.5rem;
    --invite-title-size-mobile: 1.95rem;
    --invite-detail-size: 1.1rem;

    /* The inner keyline: a card inside a card, as on a printed invitation. */
    --invite-frame: 1px solid #14110f;
    --invite-frame-inset: 9px;
    --invite-frame-radius: 0;
}

/* Hairline double rule under the top bar - the letterpress signature. */
:root[data-theme="frederik"] .topbar {
    border-bottom: 1px solid #14110f;
    box-shadow: 0 3px 0 -2px #14110f;
}

/* Small caps for labels, the way a 1930s form would set them. */
:root[data-theme="frederik"] th,
:root[data-theme="frederik"] label,
:root[data-theme="frederik"] .section-label { font-weight: 600; }

:root[data-theme="frederik"] .btn:hover { background: #2c2925; filter: none; }
:root[data-theme="frederik"] .btn-quiet:hover { background: #eee9e0; }

/* The event title is the one place the Didone gets to perform. */
:root[data-theme="frederik"] .invite h1 { line-height: 1.1; }

/* Double rule around the details block. */
:root[data-theme="frederik"] .invite-details {
    border-top: 1px solid #14110f;
    border-bottom: 1px solid #14110f;
    padding: var(--space-4) 0;
    position: relative;
}
:root[data-theme="frederik"] .invite-details::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    border-bottom: 1px solid #14110f;
}

:root[data-theme="frederik"] .meter { border-radius: 0; }
:root[data-theme="frederik"] .meter .m-yes { background: #14110f; }
:root[data-theme="frederik"] .meter .m-maybe { background: #8a837b; }
:root[data-theme="frederik"] .meter .m-no { background: #cec7bb; }

/* --- the envelope ------------------------------------------------- */
/* Cream stock, hairline ink keyline, square corners, deep red wax -
   the only colour anywhere in this theme, and only because sealing wax
   is red. */
:root[data-theme="frederik"] {
    --envelope-paper: linear-gradient(168deg, #fdfbf6 0%, #f2ece0 100%);
    --envelope-lining: #ece5d8;
    --envelope-flap: linear-gradient(172deg, #f7f2e8 0%, #e7dfd0 100%);
    --envelope-border: 1px solid #14110f;
    --envelope-radius: 0;
    --envelope-shadow: 0 2px 0 0 #e3ddd2, 0 26px 60px -38px rgba(20, 17, 15, .8);
    --envelope-seal: #8f2d2d;
    --envelope-seal-ink: #f7ece0;
    --envelope-texture: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
    --envelope-texture-opacity: .07;
}
