/* The St. Ann Time Capsule — time-capsule.html
   Builds on admissions.css (hero, form, buttons, cards). */

.tc-hero {
    background:
        radial-gradient(55% 100% at 50% 0%, rgba(240, 213, 138, .22) 0%, transparent 65%),
        linear-gradient(160deg, #1a2744 0%, #24365c 55%, #3d4a2e 100%);
    text-align: center;
}
.tc-hero .breadcrumb { justify-content: center; }
.tc-hero .adm-lead { margin-left: auto; margin-right: auto; max-width: 700px; }
.tc-opens { margin: 2.2rem 0 .8rem; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: #f0d58a; }
.tc-clock { display: flex; justify-content: center; gap: .8rem; flex-wrap: wrap; }
.tc-clock div {
    min-width: 6.2rem;
    padding: .9rem .6rem .7rem;
    border-radius: 14px;
    background: rgba(255, 253, 247, .08);
    border: 1px solid rgba(240, 213, 138, .35);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.tc-clock strong { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 2.8rem; line-height: 1; color: #fffdf7; font-variant-numeric: tabular-nums; }
.tc-clock span { margin-top: .35rem; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #c9d1e0; }
.tc-date { margin: 1.2rem 0 0; color: #e9cf88; font-weight: 600; }
.tc-date i { margin-right: .35rem; }
#tc-open-state .adm-btn { margin-top: 1.2rem; }

/* ---------- the capsule ---------- */
.tc-capsule-grid { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 3.5rem; align-items: center; }
.tc-capsule { position: relative; width: 100%; max-width: 300px; margin: 0 auto; }
.tc-capsule-lid {
    height: 64px;
    margin: 0 18px -6px;
    border-radius: 60px 60px 8px 8px;
    background: linear-gradient(90deg, #6d5a2a, #e3c574 35%, #b8973d 70%, #6d5a2a);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .2);
    display: grid;
    place-items: center;
    position: relative;
    z-index: 2;
}
.tc-capsule-lid span {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 1.7rem;
    color: #3b2f12;
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid rgba(59, 47, 18, .55);
}
.tc-capsule-body {
    height: 320px;
    border-radius: 10px 10px 40px 40px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .5) 0 8%, rgba(255, 255, 255, .08) 22% 78%, rgba(0, 0, 0, .12) 92%),
        linear-gradient(180deg, rgba(214, 226, 240, .55), rgba(170, 188, 210, .55));
    border: 3px solid #a7b3c4;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 -20px 40px rgba(26, 39, 68, .15), 0 20px 40px rgba(26, 39, 68, .18);
}
.tc-envelopes {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    flex-wrap: wrap-reverse;
    justify-content: center;
    gap: 2px 0;
}
.tc-env {
    width: 52px;
    height: 34px;
    margin: 0 -4px;
    border-radius: 3px;
    background:
        linear-gradient(150deg, transparent 49%, rgba(123, 45, 58, .25) 50%, transparent 52%),
        linear-gradient(30deg, transparent 49%, rgba(123, 45, 58, .25) 50%, transparent 52%),
        #fffaf0;
    border: 1px solid #d8c9a5;
    transform: rotate(var(--r, 0deg));
    box-shadow: 0 2px 3px rgba(0, 0, 0, .12);
    animation: tc-drop .6s ease-out both;
    animation-delay: var(--d, 0s);
}
@keyframes tc-drop { from { opacity: 0; transform: translateY(-120px) rotate(var(--r, 0deg)); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }

.tc-capsule-section h2 { margin-top: .2rem; color: var(--adm-navy); }
.tc-capsule-section h2 #tc-total { color: var(--adm-wine); font-size: 1.25em; }
.tc-groups { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tc-groups li { padding: .4rem .85rem; border-radius: 999px; background: var(--adm-tint); border: 1px solid var(--adm-line); font-size: .95rem; }
.tc-groups strong { color: var(--adm-navy); }
.tc-sealed-note { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.3rem; font-style: italic; color: var(--adm-wine); }
.tc-where { margin-top: 1.8rem; padding: 1.2rem 1.3rem; border-radius: 14px; background: #fffdf6; border: 1px solid #e7d6a4; }
.tc-where label { display: block; font-weight: 700; color: var(--adm-navy); margin-bottom: .5rem; }
.tc-where label i { color: var(--adm-gold); margin-right: .35rem; }
.tc-where select { width: 100%; min-height: 46px; padding: .6rem .7rem; border: 1px solid #b7bfcc; border-radius: 7px; font: inherit; background: #fff; }
.tc-grade-result { margin: .7rem 0 0; font-weight: 600; color: var(--adm-wine); min-height: 1.5em; }

/* ---------- form ---------- */
.tc-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 2.5rem; align-items: start; }
.tc-form h2 { margin-top: 0; color: var(--adm-navy); }
.tc-form .adm-row { margin-top: 1rem; }
.tc-count { text-align: right; margin: .3rem 0 0; font-size: .85rem; color: var(--adm-muted); }
.tc-ideas { margin-top: .4rem; border: 1px dashed #cdbf96; border-radius: 10px; padding: .6rem .9rem; background: #fffdf6; }
.tc-ideas summary { cursor: pointer; font-weight: 700; color: var(--adm-wine); }
.tc-ideas ul { margin: .6rem 0 .2rem; padding-left: 1.2rem; line-height: 1.6; color: var(--adm-muted); }
.tc-predictions { border: 0; padding: 0; margin: 1.6rem 0 0; min-width: 0; }
.tc-page .adm-form .tc-predictions legend { font-weight: 700; color: var(--adm-navy); margin-bottom: .2rem; padding: 0; }
.tc-page .adm-form .tc-predictions label { font-weight: 500; font-style: italic; margin-top: .8rem; }
.tc-share { border: 0; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .6rem; min-width: 0; }
.tc-share legend { font-weight: 700; color: var(--adm-navy); margin-bottom: .5rem; padding: 0; }
.tc-page .adm-form label.tc-option {
    display: flex;
    gap: .8rem;
    align-items: flex-start;
    border: 1px solid var(--adm-line);
    border-radius: 10px;
    padding: .85rem 1rem;
    cursor: pointer;
    background: #fff;
    margin: 0;
    font-weight: 400;
}
.tc-page .adm-form .tc-option input[type="radio"] { display: block; width: 1.1rem; height: 1.1rem; min-height: 0; padding: 0; margin: .2rem 0 0; border: 0; flex: none; accent-color: #7b2d3a; }
.tc-option strong { display: block; color: var(--adm-navy); }
.tc-option small { display: block; color: var(--adm-muted); font-size: .92rem; margin-top: .15rem; }
.tc-option:has(input:checked) { border-color: #c9a84c; background: #fffaf0; box-shadow: 0 0 0 1px #c9a84c; }
.tc-option:has(input:focus-visible) { outline: 3px solid #b5760a; outline-offset: 2px; }
.tc-page .adm-form label.tc-check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 500; line-height: 1.5; margin-top: 1.25rem; }
.tc-check input[type="checkbox"] { opacity: 1; position: static; width: 1.15rem; height: 1.15rem; margin-top: .2rem; flex: none; accent-color: var(--adm-navy); }
.tc-form .adm-submit { margin-top: 1.25rem; font: inherit; font-weight: 700; cursor: pointer; }

.tc-side { display: grid; gap: 1rem; }
.tc-card h3 { margin: 0 0 .5rem; font-size: 1.05rem; color: var(--adm-navy); }
.tc-card h3 i { color: var(--adm-gold); margin-right: .35rem; }
.tc-card p { margin: 0; line-height: 1.6; color: var(--adm-muted); }
.tc-card a { color: var(--adm-wine); font-weight: 600; }
.tc-card .adm-btn { margin-top: 1rem; font: inherit; font-weight: 700; cursor: pointer; }

.tc-closed { text-align: center; }
.tc-closed i { font-size: 2.4rem; color: var(--adm-gold); }

/* ---------- opened letters ---------- */
.tc-letters { columns: 3 300px; column-gap: 1.5rem; }
.tc-letter {
    break-inside: avoid;
    margin: 0 0 1.5rem;
    padding: 1.6rem 1.5rem 1.2rem;
    background: #fffdf7;
    border: 1px solid #e4d8bb;
    border-radius: 4px;
    box-shadow: 0 10px 24px rgba(26, 39, 68, .08);
    background-image: repeating-linear-gradient(180deg, transparent 0 31px, rgba(26, 39, 68, .07) 31px 32px);
}
.tc-letter-to { margin: 0 0 .6rem; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--adm-wine); font-weight: 700; }
.tc-letter-body { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.15rem; line-height: 32px; }
.tc-letter-body p { margin: 0 0 32px; }
.tc-letter-from { margin: 0; text-align: right; font-weight: 700; color: var(--adm-navy); }

/* ---------- printable letter page (screen: hidden) ---------- */
.tc-paper { display: none; }
@media print {
    html.tc-printing body > *:not(main),
    html.tc-printing main > *:not(.tc-paper),
    html.tc-printing .ang-card { display: none !important; }
    html.tc-printing .tc-paper { display: block; color: #000; font-family: Georgia, serif; }
    .tc-paper-head { display: flex; gap: 1rem; align-items: center; border-bottom: 2px solid #000; padding-bottom: .6rem; }
    .tc-paper-head img { width: 64px; height: auto; }
    .tc-paper-kicker { margin: 0; font-size: 10pt; letter-spacing: .1em; text-transform: uppercase; }
    .tc-paper h2 { margin: .2rem 0 0; font-size: 20pt; color: #000; }
    .tc-paper-fields p { margin: 1.1rem 0 0; font-size: 12pt; display: flex; gap: .5rem; }
    .tc-paper-fields span { flex: 1; border-bottom: 1px solid #000; }
    .tc-paper-label { margin: 1.4rem 0 .3rem; font-size: 12pt; }
    .tc-paper-lines { height: 15.5cm; border: 1px solid #000; background-image: repeating-linear-gradient(180deg, transparent 0 .99cm, #999 .99cm 1cm); }
    .tc-paper-share { margin-top: .9rem; font-size: 11pt; }
}

@media (max-width: 900px) {
    .tc-capsule-grid, .tc-grid { grid-template-columns: 1fr; }
    .tc-capsule { max-width: 230px; }
    .tc-capsule-body { height: 250px; }
}
@media (max-width: 520px) {
    .tc-clock div { min-width: 4.4rem; }
    .tc-clock strong { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
    .tc-env { animation: none; }
}
