/* ==========================================================================
   Tech - a terminal that types the invitation; agenda as a log, speakers as profile cards
   Palette: --inv-primary (terminal colour), --inv-accent (panel), --inv-bg (screen), --inv-text
   ========================================================================== */

.tech {
    --te-mono: var(--inv-font-heading);
    --te-panel: color-mix(in srgb, var(--inv-accent) 70%, var(--inv-bg));
    --te-line: color-mix(in srgb, var(--inv-primary) 22%, transparent);
    --te-muted: color-mix(in srgb, var(--inv-text) 60%, var(--inv-bg));
    --te-glow: color-mix(in srgb, var(--inv-primary) 40%, transparent);
    --kit-radius: 6px;
    --kit-field-bg: color-mix(in srgb, var(--inv-bg) 70%, #000);
    --kit-field-border: var(--te-line);
    font-family: var(--inv-font-body);
    font-size: 1.02rem;
    color: var(--inv-text);
    background:
        linear-gradient(color-mix(in srgb, var(--inv-primary) 7%, transparent) 1px, transparent 1px) 0 0 / 100% 32px,
        var(--inv-bg);
    background-attachment: fixed;
    overflow-x: clip;
    font-variant-ligatures: none;
}
@media (max-width: 760px) { .tech { background-attachment: scroll; } }
.tech h1, .tech h2, .tech h3 { font-family: var(--te-mono); font-weight: 700; line-height: 1.15; }
/* zero specificity, so the template's own heading classes can set their spacing */
:where(.tech) :is(h1, h2, h3) { margin: 0; }
.te-key { font-family: var(--te-mono); color: var(--inv-primary); margin: 0 0 6px; }
.te-muted { color: var(--te-muted); margin: 2px 0 0; }
.te-comment { font-family: var(--te-mono); font-size: .9rem; color: var(--te-muted); margin: 4px 0 0; }
.te-prompt { color: var(--inv-primary); margin-right: .4em; }

/* ---------- Navigation ---------- */
.te-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; padding: 16px clamp(16px, 4vw, 44px); display: flex; justify-content: flex-end; font-family: var(--te-mono); }
.te-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 18px; }
.te-nav a { text-decoration: none; font-size: .84rem; color: var(--te-muted); padding: 6px 0; }
.te-nav a::before { content: "./"; color: var(--te-line); }
.te-nav a:hover, .te-nav a.is-current { color: var(--inv-primary); }
.te-nav .kit-nav-brand { font-weight: 700; color: var(--inv-primary); margin-right: auto; }
.te-nav .kit-nav-brand::before { content: ""; }
.te-nav.is-stuck { align-items: center; padding: 8px clamp(16px, 4vw, 44px); background: color-mix(in srgb, var(--inv-bg) 94%, transparent); box-shadow: 0 1px 0 var(--te-line); }
.tech .kit-to-top { border-radius: 6px; background: var(--te-panel); border: 1px solid var(--inv-primary); color: var(--inv-primary); }
@media (max-width: 899px) {
    .te-nav { padding: 10px 12px; }
    .te-nav .kit-nav-toggle { color: var(--inv-primary); font-size: 1.4rem; margin-left: auto; }
    .te-nav .kit-nav-links { display: none; }
    .te-nav.is-open .kit-nav-links {
        display: flex; flex-direction: column; gap: 12px; position: absolute; top: 56px; left: 12px; right: 12px;
        padding: 20px; background: var(--te-panel); border: 1px solid var(--te-line); border-radius: 8px;
    }
}

/* ---------- Terminal window ---------- */
.te-terminal { width: min(860px, 100%); margin: 0 auto; border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--inv-bg) 80%, #000); border: 1px solid var(--te-line); box-shadow: 0 30px 80px -40px var(--te-glow), 0 0 0 1px rgba(0, 0, 0, .4); }
.te-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--te-panel); border-bottom: 1px solid var(--te-line); }
.te-bar span { width: 12px; height: 12px; border-radius: 50%; background: #FF5F57; }
.te-bar span:nth-child(2) { background: #FEBC2E; }
.te-bar span:nth-child(3) { background: #28C840; }
.te-bar em { margin-left: auto; margin-right: auto; font-style: normal; font-family: var(--te-mono); font-size: .8rem; color: var(--te-muted); }
.te-screen { padding: clamp(22px, 4vw, 40px); font-family: var(--te-mono); text-align: left; }

/* ---------- Hero: lines appear one by one, the command types itself ---------- */
.te-hero { min-height: 100svh; display: grid; place-items: center; padding: 90px clamp(14px, 4vw, 40px) 60px; }
.te-line { margin: 0 0 10px; opacity: 0; animation: te-appear .01s linear calc(var(--n) * .45s + .3s) forwards; }
@keyframes te-appear { to { opacity: 1; } }
.tech .te-title { font-size: clamp(2.2rem, 7vw, 4.4rem); color: var(--inv-primary); text-shadow: 0 0 24px var(--te-glow); margin: 4px 0 18px; }
.te-out { color: var(--inv-text); font-size: 1rem; line-height: 1.6; }
.te-key { color: var(--inv-primary); }
.te-command { margin-top: 18px; }
.te-typed { display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap; width: 0; animation: te-type 1.2s steps(var(--chars)) 3.2s forwards; }
@keyframes te-type { to { width: calc(var(--chars) * 1ch); } }
.te-cursor { display: inline-block; width: .6em; height: 1.1em; vertical-align: text-bottom; background: var(--inv-primary); animation: te-blink 1s steps(1) infinite; }
@keyframes te-blink { 50% { opacity: 0; } }
.te-button { display: inline-block; margin-top: 12px; padding: 12px 22px; border-radius: 6px; background: var(--inv-primary); color: var(--inv-bg); font-weight: 700; text-decoration: none; }
.te-button:hover { box-shadow: 0 0 24px var(--te-glow); }
@media (prefers-reduced-motion: reduce) { .te-line { opacity: 1; animation: none; } .te-typed { width: auto; animation: none; } .te-cursor { animation: none; } }

/* ---------- Sections ---------- */
.te-section { max-width: 1000px; margin: 0 auto; padding: clamp(60px, 9vw, 100px) 22px; }
.te-title-block { display: flex; align-items: baseline; gap: 12px; margin: 0 0 32px; }
.te-title-hash { font-family: var(--te-mono); font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--te-muted); }
.te-title-block h2 { font-size: clamp(1.8rem, 4.6vw, 2.8rem); color: var(--inv-text); }
.te-prose { max-width: 720px; font-size: 1.12rem; line-height: 1.75; color: color-mix(in srgb, var(--inv-text) 88%, var(--inv-bg)); }
.te-prose p { margin: 0 0 1em; }
.te-card { padding: 22px 24px; border-radius: 10px; background: var(--te-panel); border: 1px solid var(--te-line); }
.te-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.te-card p { margin: 0 0 .5em; line-height: 1.65; }

/* Organizer */
.te-organizer { display: grid; gap: 24px; align-items: center; }
@media (min-width: 760px) { .te-organizer { grid-template-columns: 200px 1fr; } }
.te-logo { width: 100%; max-width: 200px; padding: 14px; border-radius: 8px; background: #fff; }

/* Agenda as a log */
.te-log { list-style: none; margin: 0; padding: 0; font-family: var(--te-mono); border-left: 2px solid var(--te-line); }
.te-log-line { display: grid; grid-template-columns: auto auto 1fr; gap: 6px 14px; align-items: baseline; padding: 14px 0 14px 18px; border-bottom: 1px dashed var(--te-line); }
.te-log-time { color: var(--inv-primary); }
.te-log-track { font-size: .72rem; padding: 2px 8px; border-radius: 4px; background: var(--te-line); color: var(--inv-text); }
.te-log-body h3 { font-size: 1.05rem; font-weight: 500; }
.te-log-who { margin: 4px 0 0; color: var(--inv-primary); font-size: .9rem; }
@media (max-width: 600px) { .te-log-line { grid-template-columns: auto 1fr; } .te-log-body { grid-column: 1 / -1; } }

/* Speakers */
.te-speakers { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.te-speaker { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; }
.te-avatar { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--te-line); font-family: var(--te-mono); font-size: 1.8rem; color: var(--inv-primary); }
.te-avatar img { font-size: 0; color: transparent; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1); }
.te-speaker:hover .te-avatar img { filter: none; }
.te-speaker-role { font-size: .9rem; color: var(--te-muted); }
.te-speaker-bio { font-size: .92rem; }

/* Venue */
.te-venues { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.te-venue-time { font-family: var(--te-mono); font-size: 2rem; color: var(--inv-primary); margin: 0 0 6px !important; }
.te-venue-place { font-weight: 600; margin-top: 10px !important; }
.tech .kit-event-actions { justify-content: flex-start; margin-top: 14px; }
.tech .kit-button { border-radius: 6px; border: 1px solid var(--inv-primary); color: var(--inv-primary); background: transparent; font-family: var(--te-mono); font-size: .85rem; }
.tech .kit-button:hover { background: var(--inv-primary); color: var(--inv-bg); }

/* Countdown: uptime */
.te-countdown { text-align: left; }
.te-countdown .kit-countdown { justify-content: flex-start; gap: 10px; margin-top: 16px; }
.te-countdown .kit-countdown-unit { padding: 14px 18px; border-radius: 8px; background: var(--te-panel); border: 1px solid var(--te-line); min-width: 100px; }
.te-countdown .kit-countdown-value { font-family: var(--te-mono); color: var(--inv-primary); font-size: clamp(2rem, 7vw, 3rem); text-shadow: 0 0 20px var(--te-glow); }
.te-countdown .kit-countdown-label { font-family: var(--te-mono); color: var(--te-muted); }

/* Gallery */
.te-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .te-gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
.te-gallery-grid a { border-radius: 8px; border: 1px solid var(--te-line); aspect-ratio: 16 / 10; }
.te-gallery-grid img { filter: saturate(.7); transition: filter .3s; }
.te-gallery-grid a:hover img { filter: none; }

/* RSVP inside a terminal */
.te-rsvp { width: min(720px, 100%); }
.te-rsvp-title { font-size: 1.4rem; margin-bottom: 18px; }
.tech .inv-rsvp__intro { color: var(--te-muted); }
.tech .inv-rsvp__deadline { color: var(--inv-primary); font-family: var(--te-mono); font-size: .9rem; }
.tech .inv-rsvp__choice label { font-family: var(--te-mono); }
.tech .inv-rsvp__field > label, .tech .inv-rsvp__field legend { font-family: var(--te-mono); font-size: .85rem; color: var(--te-muted); }
.tech .inv-rsvp__field > label::before, .tech .inv-rsvp__field legend::before { content: "> "; color: var(--inv-primary); }
.tech .inv-rsvp__field input:not([type=checkbox]):not([type=radio]), .tech .inv-rsvp__field select, .tech .inv-rsvp__field textarea { color: var(--inv-text); font-family: var(--te-mono); }
.tech .inv-rsvp__submit { border-radius: 6px; font-family: var(--te-mono); font-weight: 700; color: var(--inv-bg); }

/* Info */
.te-info-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.te-faq { margin-top: 40px; }
.te-faq details { border-bottom: 1px dashed var(--te-line); padding: 14px 0; }
.te-faq summary { cursor: pointer; list-style: none; font-family: var(--te-mono); font-size: 1rem; }
.te-faq summary::-webkit-details-marker { display: none; }
.te-faq summary::before { content: "▸ "; color: var(--inv-primary); }
.te-faq details[open] summary::before { content: "▾ "; }
.te-faq details p { margin: 8px 0 0 20px; color: var(--te-muted); }

/* Contact */
.te-contacts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.te-contact-name { font-family: var(--te-mono); font-size: 1.2rem; margin: 0 0 4px; }
.te-contacts a { color: var(--inv-primary); text-decoration: none; font-family: var(--te-mono); }

/* Footer */
.te-footer { padding: 50px 22px 70px; text-align: center; border-top: 1px solid var(--te-line); }
.te-footer-title { font-family: var(--te-mono); font-weight: 700; font-size: 1.4rem; color: var(--inv-primary); margin: 0 0 10px; }
