/* =============================================================
   CHIPSCAT STUDIO — 音檔修復服務
   Dark, minimal, conversion-focused.
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
    --bg:            #000000;
    --bg-alt:        #08080b;
    --surface:       rgba(255, 255, 255, 0.035);
    --surface-2:     rgba(255, 255, 255, 0.07);
    --border:        rgba(255, 255, 255, 0.09);
    --border-2:      rgba(255, 255, 255, 0.20);

    --text:          #f5f5f7;
    --text-dim:      #a1a1a6;
    --text-faint:    #6e6e73;

    /* One accent only: NVIDIA green. Everything else is black / white / grey,
       so the green always means "this is the thing to click". */
    --accent:        #76b900;
    --accent-soft:   rgba(118, 185, 0, 0.10);
    --accent-edge:   rgba(118, 185, 0, 0.28);

    --line:          #76b900;
    --line-hover:    #669f00;

    --radius:        18px;
    --radius-lg:     26px;
    --pill:          999px;
    --nav-h:         64px;

    /* System fonts only. Loading Noto Sans TC from Google Fonts cost a
       render-blocking stylesheet, two extra TLS handshakes and a large CJK
       download on mobile. Every target platform already ships an excellent
       Traditional Chinese UI face, so we use it. */
    --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
            'PingFang TC', 'Noto Sans TC', 'Microsoft JhengHei', 'Hiragino Sans TC',
            'Helvetica Neue', Arial, sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    --section-y: clamp(72px, 9vw, 132px);
}

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

html {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font);
    scroll-behavior: smooth;
    /* fixed nav offset for anchor links */
    scroll-padding-top: calc(var(--nav-h) + 20px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

body {
    line-height: 1.65;
    overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

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

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; text-wrap: balance; }

p { text-wrap: pretty; }

a { color: inherit; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.skip-link {
    position: absolute;
    left: 50%;
    top: -100px;
    transform: translateX(-50%);
    z-index: 2000;
    background: #fff;
    color: #000;
    padding: 10px 20px;
    border-radius: var(--pill);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- Layout helpers ---------- */
.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}
.container-narrow { max-width: 760px; }
.center { text-align: center; }

.section {
    position: relative;
    padding: var(--section-y) 0;
}

.section-alt {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-head {
    max-width: 640px;
    margin: 0 auto clamp(40px, 5vw, 64px);
    text-align: center;
}

.eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 14px;
}

.section-title {
    font-size: clamp(1.7rem, 3.6vw, 2.5rem);
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}

.section-lead {
    color: var(--text-dim);
    font-size: clamp(0.95rem, 1.6vw, 1.05rem);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 26px;
    font-family: inherit;
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
    border-radius: var(--pill);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.22s var(--ease),
                border-color 0.22s var(--ease),
                transform 0.22s var(--ease),
                box-shadow 0.22s var(--ease);
}

.btn-icon { width: 1.2em; height: 1.2em; flex: none; }

.btn-line {
    background-color: var(--line);
    color: #fff;
    box-shadow: 0 6px 22px rgba(118, 185, 0, 0.22);
}
.btn-line:hover {
    background-color: var(--line-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(118, 185, 0, 0.32);
}

/* ---------- Attention animation on the main LINE CTAs ----------
   A slow breathing halo plus an occasional light sweep. Kept slow and
   low-contrast so it reads as "alive", not as a flashing advert. */
.btn-pulse {
    overflow: hidden;
    animation: cta-halo 2.8s ease-in-out infinite;
}

/* Only the inline buttons need a positioning context; the floating bar is
   already position:fixed and would break if this reset it to relative. */
.btn.btn-pulse { position: relative; }

.btn-pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(105deg,
        rgba(255, 255, 255, 0) 38%,
        rgba(255, 255, 255, 0.38) 50%,
        rgba(255, 255, 255, 0) 62%);
    transform: translateX(-130%);
    animation: cta-sweep 4.6s ease-in-out infinite;
}

/* Pause once the pointer is on it — the user has already noticed. */
.btn-pulse:hover,
.btn-pulse:focus-visible { animation-play-state: paused; }
.btn-pulse:hover::after,
.btn-pulse:focus-visible::after { animation-play-state: paused; }

@keyframes cta-halo {
    0%, 100% { box-shadow: 0 6px 22px rgba(118, 185, 0, 0.24), 0 0 0 0 rgba(118, 185, 0, 0.42); }
    55%      { box-shadow: 0 8px 28px rgba(118, 185, 0, 0.34), 0 0 0 15px rgba(118, 185, 0, 0); }
}

@keyframes cta-sweep {
    0%, 62%   { transform: translateX(-130%); }
    88%, 100% { transform: translateX(130%); }
}

.btn-ghost {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
.btn-ghost:hover {
    background: var(--surface-2);
    border-color: var(--border-2);
    transform: translateY(-2px);
}

.btn-large { padding: 15px 34px; font-size: 1rem; }

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-h);
    z-index: 100;
    display: flex;
    align-items: center;
    border-bottom: 1px solid transparent;
    transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom-color: var(--border);
}

.nav-container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand { display: flex; align-items: center; flex: none; }

.brand-logo {
    height: 34px;
    width: auto;
    opacity: 0.95;
    transition: opacity 0.2s var(--ease);
}
.brand:hover .brand-logo { opacity: 1; }

.nav-links {
    display: flex;
    gap: 30px;
    margin-left: auto;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--text); }

.nav-btn { padding: 9px 20px; font-size: 0.86rem; flex: none; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: calc(var(--nav-h) + clamp(56px, 9vw, 104px)) 0 clamp(72px, 9vw, 116px);
    text-align: center;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* Neutral halo — the ground stays black/white/grey so green reads as action. */
    background:
        radial-gradient(58% 44% at 50% 14%, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 72%),
        radial-gradient(34% 26% at 50% 4%,  rgba(118, 185, 0, 0.09),  rgba(118, 185, 0, 0)  70%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-badge {
    width: clamp(76px, 12vw, 96px);
    height: auto;
    margin: 0 auto 26px;
    border-radius: 22%;
    box-shadow: 0 18px 60px rgba(118, 185, 0, 0.16);
}

.hero-title {
    font-size: clamp(2.6rem, 7.4vw, 4.9rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 22px;
}

.hero-title em {
    font-style: normal;
    color: var(--accent);
    background: linear-gradient(175deg, #ffffff 22%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: clamp(1rem, 1.9vw, 1.18rem);
    color: var(--text-dim);
    margin-bottom: 38px;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 34px;
}

.trust-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 12px;
    list-style: none;
}

.trust-chips li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 15px;
    font-size: 0.8rem;
    color: var(--text-dim);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--pill);
}

.trust-chips li::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    flex: none;
}

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 18px; }

.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    overflow: hidden;
    transition: border-color 0.28s var(--ease),
                background-color 0.28s var(--ease),
                transform 0.28s var(--ease);
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.card:hover {
    border-color: var(--border-2);
    background: var(--surface-2);
    transform: translateY(-3px);
}
.card:hover::before { opacity: 1; }

/* Neutral at rest, green on hover — keeps four green icons from competing
   with the CTA while still rewarding attention. */
.card-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-dim);
    transition: color 0.28s var(--ease), background-color 0.28s var(--ease),
                border-color 0.28s var(--ease);
}
.card-icon svg { width: 22px; height: 22px; }

.card:hover .card-icon {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent-edge);
}

.card h3 {
    font-size: 1.06rem;
    letter-spacing: -0.01em;
    margin-bottom: 9px;
}

.card p {
    color: var(--text-dim);
    font-size: 0.885rem;
    line-height: 1.7;
}

/* ---------- Format strip ---------- */
.format-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 32px;
    padding: 18px 24px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    font-size: 0.83rem;
    color: var(--text-faint);
}

.format-label {
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}

.format-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.format-list li {
    padding: 4px 12px;
    border-radius: var(--pill);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* ---------- Process ---------- */
.process {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    list-style: none;
}

.process-step {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 26px;
    transition: border-color 0.28s var(--ease);
}
.process-step:hover { border-color: var(--border-2); }

.process-num {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--text-faint);
    margin-bottom: 16px;
    font-variant-numeric: tabular-nums;
    transition: color 0.28s var(--ease);
}
.process-step:hover .process-num { color: var(--accent); }

.process-step h3 {
    font-size: 1.12rem;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.process-step p {
    color: var(--text-dim);
    font-size: 0.885rem;
    line-height: 1.7;
}

/* ---------- Tutorial ---------- */
.tutorial {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(28px, 4vw, 52px);
    align-items: start;
}

.tutorial-steps { display: flex; flex-direction: column; gap: 22px; }

.tutorial-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
}

.step-badge {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.tutorial-step h3 {
    font-size: 1.02rem;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    padding-top: 3px;
}

.tutorial-step p {
    color: var(--text-dim);
    font-size: 0.885rem;
    line-height: 1.7;
}
.tutorial-step strong { color: var(--text); font-weight: 600; }

.tutorial-note {
    margin-top: 4px;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-edge);
    color: var(--text-dim);
    font-size: 0.845rem;
    line-height: 1.7;
}
.tutorial-note strong { color: var(--accent); font-weight: 600; }

/* Email to share the Drive folder with */
.share-email {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 14px 0 10px;
    padding: 13px 15px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.share-email-label {
    flex-basis: 100%;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.share-email-value {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
}

.tutorial-step .share-alt {
    font-size: 0.82rem;
    color: var(--text-faint);
}

.tutorial-figure {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-alt);
}

.tutorial-figure img { width: 100%; }

.tutorial-figure figcaption {
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    color: var(--text-faint);
    font-size: 0.8rem;
    line-height: 1.6;
    text-align: center;
}

/* ---------- Template box ---------- */
.template-box {
    margin-top: clamp(36px, 5vw, 56px);
    padding: clamp(24px, 3.2vw, 34px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.template-head { margin-bottom: 18px; }

.template-head h3 {
    font-size: 1.12rem;
    letter-spacing: -0.01em;
    margin-bottom: 7px;
}

.template-head p {
    color: var(--text-dim);
    font-size: 0.885rem;
}

.template-text {
    margin: 0 0 18px;
    padding: 20px;
    background: #050508;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.85;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

.template-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; }

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.28s var(--ease);
}
.faq-item:hover { border-color: var(--border-2); }

.faq-item h3 { font-size: inherit; font-weight: inherit; line-height: inherit; }

.faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    background: none;
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    text-align: left;
    line-height: 1.5;
    cursor: pointer;
}

.faq-icon {
    position: relative;
    width: 15px;
    height: 15px;
    flex: none;
    color: var(--text-faint);
}
.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transform: translateY(-50%);
    transition: transform 0.32s var(--ease), opacity 0.32s var(--ease);
}
.faq-icon::after { transform: translateY(-50%) rotate(90deg); }

.faq-item.open .faq-icon { color: var(--accent); }
.faq-item.open .faq-icon::after { transform: translateY(-50%) rotate(0deg); opacity: 0; }

.faq-a { color: var(--text-dim); }
.faq-a-inner { padding: 0 22px 22px; }
.faq-a p { font-size: 0.9rem; line-height: 1.8; }

/* Collapsed only when JS is available, so content stays readable without JS. */
.js .faq-a {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 0.36s var(--ease), visibility 0.36s var(--ease);
}
.js .faq-a > .faq-a-inner { min-height: 0; overflow: hidden; }
.js .faq-item.open .faq-a { grid-template-rows: 1fr; visibility: visible; }

/* ---------- Final CTA ---------- */
.cta { overflow: hidden; }

.cta-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(52% 60% at 50% 55%, rgba(118, 185, 0, 0.10), transparent 72%);
}

.cta .container { position: relative; z-index: 1; }

.cta-title {
    font-size: clamp(1.8rem, 4.2vw, 2.9rem);
    letter-spacing: -0.025em;
    margin-bottom: 16px;
}

.cta-sub {
    color: var(--text-dim);
    font-size: clamp(0.95rem, 1.7vw, 1.08rem);
    margin-bottom: 34px;
}

.cta-id {
    margin-top: 22px;
    font-size: 0.86rem;
    color: var(--text-faint);
}
.cta-id strong {
    color: var(--text);
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid var(--border);
    padding: clamp(44px, 6vw, 64px) 0 32px;
    background: var(--bg-alt);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 36px;
    align-items: start;
    padding-bottom: 34px;
    border-bottom: 1px solid var(--border);
}

.footer-logo { height: 30px; width: auto; opacity: 0.9; margin-bottom: 14px; }

.footer-brand p {
    color: var(--text-faint);
    font-size: 0.85rem;
    line-height: 1.7;
    max-width: 34ch;
}

.footer-links { display: flex; flex-direction: column; gap: 11px; }

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.87rem;
    transition: color 0.2s var(--ease);
    width: fit-content;
}
.footer-links a:hover { color: var(--text); }

.footer-contact { display: flex; flex-direction: column; gap: 8px; }

.footer-contact span {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.footer-contact a {
    color: var(--line);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    width: fit-content;
}
.footer-contact a:hover { text-decoration: underline; }

.footer-contact-gap { margin-top: 8px; }

/* Email is secondary — LINE stays the visually dominant contact route. */
.footer-contact .footer-email {
    color: var(--text-dim);
    font-size: 0.87rem;
    font-weight: 500;
    letter-spacing: 0;
    word-break: break-all;
}
.footer-contact .footer-email:hover { color: var(--text); }

.footer-copy {
    text-align: center;
    padding-top: 26px;
    color: var(--text-faint);
    font-size: 0.78rem;
}

/* ---------- Floating LINE button ---------- */
.floating-line {
    position: fixed;
    bottom: 26px;
    right: 26px;
    z-index: 90;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 22px;
    background: var(--line);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--pill);
    box-shadow: 0 10px 32px rgba(118, 185, 0, 0.34);
    transition: transform 0.28s var(--ease), opacity 0.28s var(--ease),
                background-color 0.22s var(--ease), visibility 0.28s var(--ease);
}
.floating-line:hover { background: var(--line-hover); transform: translateY(-3px); }

.floating-line.hidden-cta {
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    pointer-events: none;
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    transition: opacity 0.26s var(--ease);
}
.modal-overlay[hidden] { display: none; }
.modal-overlay.open { opacity: 1; }

.modal {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 38px 32px 30px;
    text-align: center;
    background: #0c0c10;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.7);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.3s var(--ease);
}
.modal-overlay.open .modal { transform: none; }

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--text-faint);
    cursor: pointer;
    transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.modal-close:hover { color: var(--text); background: var(--surface-2); }
.modal-close svg { width: 17px; height: 17px; }

.modal-logo {
    width: 74px;
    height: auto;
    margin: 0 auto 18px;
    border-radius: 22%;
}

.modal h2 {
    font-size: 1.24rem;
    letter-spacing: -0.015em;
    margin-bottom: 8px;
}

.modal > p {
    color: var(--text-dim);
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: 22px;
}

.modal-id {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.modal-id span {
    font-size: 0.7rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.modal-id strong {
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.btn-copy {
    margin-left: auto;
    padding: 5px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn-copy:hover { background: rgba(255, 255, 255, 0.14); border-color: var(--border-2); }

.modal-cta { width: 100%; }

.modal-hint {
    margin-top: 14px;
    color: var(--text-faint);
    font-size: 0.76rem;
    line-height: 1.6;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    z-index: 1100;
    padding: 12px 22px;
    background: rgba(255, 255, 255, 0.97);
    color: #000;
    font-size: 0.86rem;
    font-weight: 600;
    border-radius: var(--pill);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 14px);
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s var(--ease);
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- Scroll reveal (JS only) ---------- */
.js .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.in-view { opacity: 1; transform: none; }

/* =============================================================
   Responsive
   ============================================================= */

@media (max-width: 980px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tutorial { grid-template-columns: 1fr; }
    .tutorial-figure { max-width: 560px; margin: 0 auto; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
    .nav-links { display: none; }
}

@media (max-width: 640px) {
    :root { --nav-h: 58px; }

    .container { padding: 0 18px; }
    .nav-container { padding: 0 18px; }

    .brand-logo { height: 28px; }

    /* The sticky bottom bar already covers this CTA — showing both is noise. */
    .nav-btn { display: none; }

    .hero-content { padding: 0 18px; }
    .hero-title { line-height: 1.16; }

    .hero-actions { flex-direction: column; align-items: stretch; gap: 11px; }
    .hero-actions .btn { width: 100%; }

    .trust-chips { gap: 8px; }
    .trust-chips li { font-size: 0.76rem; padding: 6px 13px; }

    .grid-4 { grid-template-columns: 1fr; }
    .process { grid-template-columns: 1fr; }
    .card { padding: 24px 20px; }

    .format-strip { flex-direction: column; gap: 12px; text-align: center; }
    .format-list { justify-content: center; }

    .process-step { padding: 24px 20px; }

    .template-text { font-size: 0.82rem; padding: 16px; }
    .template-actions .btn { width: 100%; }

    .faq-q { padding: 17px 18px; font-size: 0.93rem; }
    .faq-a-inner { padding: 0 18px 18px; }

    .cta .btn-large { width: 100%; }

    .footer-inner { grid-template-columns: 1fr; gap: 28px; }

    /* Full-width sticky bar converts far better than a small pill on phones. */
    .floating-line {
        left: 16px;
        right: 16px;
        bottom: 16px;
        justify-content: center;
        padding: 15px 20px;
        font-size: 0.95rem;
        border-radius: 16px;
    }

    /* keep the last CTA clear of the sticky bar */
    .footer { padding-bottom: 96px; }

    .modal { padding: 32px 22px 26px; }
    .toast { bottom: 88px; left: 16px; right: 16px; transform: translateY(14px); text-align: center; }
    .toast.show { transform: translateY(0); }
}

/* ---------- Accessibility: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .js .reveal { opacity: 1; transform: none; }
    .btn:hover, .card:hover, .floating-line:hover { transform: none; }
}
