/*
 * home.css
 * 片笺双语官网
 *
 * Created by Condy on 2026/11/10.
 */
:root {
  color-scheme: light;
  --page: #fafbf8;
  --paper: #f5f1e7;
  --mist: #edf3ef;
  --sage: #dce9e1;
  --ink: #1c3932;
  --muted: #5c6d64;
  --green: #2f6f68;
  --deep-green: #204f48;
  --light-ink: #eef4e9;
  --gold: #d5bb87;
  --rule: rgba(28, 57, 50, .14);
  --shadow: 0 28px 70px rgba(30, 64, 49, .12);
  --body-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --display-font: "Songti SC", "STSong", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { min-width: 320px; margin: 0; background: var(--page); color: var(--ink); font: 16px/1.75 var(--body-font); -webkit-font-smoothing: antialiased; }
body:lang(en) { --display-font: Georgia, "Times New Roman", serif; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .22em; }
img { display: block; max-width: 100%; }
button, summary { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button, summary { cursor: pointer; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { min-width: 0; overflow-wrap: anywhere; text-wrap: balance; }
h1, h2 { letter-spacing: -.045em; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 5px; }
.container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 16px; background: var(--deep-green); color: var(--light-ink); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; z-index: 30; top: 0; height: 72px; border-bottom: 1px solid var(--rule); background: rgba(250, 251, 248, .95); backdrop-filter: blur(18px); }
.navigation { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; min-height: 44px; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap; }
.brand-name { font: 700 1.65rem/1 var(--display-font); letter-spacing: .035em; }
.brand-subtitle { color: var(--muted); font-size: .68rem; letter-spacing: .14em; }
.desktop-nav { display: flex; align-items: center; gap: 30px; }
.desktop-nav a, .mobile-links a { display: inline-flex; min-height: 44px; align-items: center; font-size: .86rem; text-decoration: none; white-space: nowrap; }
.desktop-nav a:hover, .footer-links a:hover { color: var(--green); }
.download-link { justify-content: center; padding: 7px 18px; border-radius: 999px; background: var(--green); color: var(--light-ink); font-weight: 600; }
.desktop-nav .download-link:hover { background: var(--deep-green); color: var(--light-ink); }
.mobile-nav { display: none; }

.button { display: inline-flex; min-height: 50px; justify-content: center; align-items: center; gap: 18px; padding: 12px 24px; border: 1px solid transparent; border-radius: 999px; background: var(--green); color: var(--light-ink); font-size: .96rem; font-weight: 650; text-decoration: none; white-space: nowrap; transition: background .2s, transform .2s; }
.button:hover { background: var(--deep-green); }
.button:active { transform: translateY(1px); }
.button--secondary { border-color: var(--rule); background: rgba(250, 251, 248, .7); color: var(--ink); }
.button--secondary:hover { background: var(--sage); }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 30px; }

.hero { position: relative; isolation: isolate; overflow: clip; padding-top: clamp(65px, 7.8vw, 105px); background: var(--mist); }
.hero::before { position: absolute; z-index: -1; inset: 0; background: radial-gradient(ellipse at 24% 66%, rgba(213, 187, 135, .23), transparent 44%), radial-gradient(ellipse at 80% 55%, rgba(143, 182, 162, .22), transparent 46%); content: ""; }
.hero-copy { max-width: 1000px; margin-inline: auto; padding-inline: 24px; text-align: center; }
.hero h1 { font-size: clamp(3rem, 6.8vw, 5.6rem); font-weight: 650; line-height: 1.16; }
.hero h1 em { color: var(--green); font-family: var(--display-font); font-style: normal; font-weight: 600; }
.hero-lead { max-width: 620px; margin: 25px auto 0; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.16rem); text-wrap: pretty; }
.hero-fine { margin-top: 18px; color: var(--muted); font-size: .8rem; }
.hero-devices { display: flex; width: min(100%, 1060px); align-items: end; justify-content: center; gap: clamp(16px, 3vw, 45px); margin: 64px auto 0; padding: 18px 32px 75px; }
.hero-phone { --phone-width: clamp(235px, 27vw, 325px); position: relative; z-index: 2; animation: phone-arrive .85s both; }
.hero-phone--left, .hero-phone--right { --phone-width: clamp(200px, 23vw, 275px); z-index: 1; animation: none; }
.hero-phone--left { transform: rotate(-8deg) translateY(25px); }
.hero-phone--right { transform: rotate(8deg) translateY(25px); }
.hero-caption { padding: 0 24px 32px; color: var(--muted); font-size: .76rem; text-align: center; }

/* 外壳开口按原始 1406×2822 文件测量，截图完整放入 1206×2622 屏幕。 */
.phone { position: relative; flex: none; width: var(--phone-width, 280px); max-width: 100%; min-width: 0; aspect-ratio: 1406 / 2822; filter: drop-shadow(0 22px 23px rgba(24, 47, 34, .16)); }
.phone-screen { position: absolute; z-index: 1; top: 3.5436%; left: 7.2546%; width: 85.7752%; height: 92.9128%; overflow: hidden; border-radius: 9% / 4.2%; background: var(--paper); }
.phone-image { width: 100%; height: 100%; object-fit: contain; }
.phone-shell { position: absolute; z-index: 3; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.phone-status { position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; background: var(--paper); color: var(--muted); font-size: .8rem; text-align: center; }
.phone-status button { min-height: 44px; padding: 5px 20px; border: 1px solid var(--rule); border-radius: 999px; background: var(--page); }
.phone[data-state="loading"] .phone-image, .phone[data-state="error"] .phone-image { opacity: 0; }
.phone--unframed .phone-shell { display: none; }
.phone--unframed .phone-screen { inset: 0; width: 100%; height: 100%; border: 1px solid var(--rule); border-radius: 24px; }

.section { padding-block: clamp(85px, 10vw, 140px); }
.section-heading { max-width: 800px; margin: 0 auto 48px; text-align: center; }
.section-heading h2 { font-size: clamp(2.5rem, 4.4vw, 4.15rem); font-weight: 650; line-height: 1.2; }
.section-heading p { max-width: 630px; margin: 22px auto 0; color: var(--muted); font-size: 1.04rem; }
.tour-tabs { display: flex; width: fit-content; max-width: 100%; gap: 5px; overflow-x: auto; margin: 0 auto 30px; padding: 6px; border: 1px solid var(--rule); border-radius: 999px; background: var(--mist); scrollbar-width: thin; }
.tour-tab { flex: none; min-height: 44px; padding: 8px 25px; border: 0; border-radius: 999px; background: transparent; font-size: .94rem; font-weight: 600; white-space: nowrap; scroll-margin-inline: 8px; }
.tour-tab[aria-selected="true"] { background: var(--green); color: var(--light-ink); }
.tour-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); align-items: center; gap: clamp(40px, 7vw, 110px); padding: clamp(35px, 5vw, 70px); border-radius: 36px; background: var(--mist); }
.tour-panel + .tour-panel { margin-top: 32px; }
.tour.is-enhanced .tour-panel { margin-top: 0; animation: panel-arrive .3s; }
.tour-copy { max-width: 470px; }
.tour-copy h3 { font-size: clamp(2rem, 3.3vw, 3rem); letter-spacing: -.035em; line-height: 1.25; }
.tour-copy > p { margin-top: 24px; color: var(--muted); font-size: 1.04rem; }
.feature-list { display: grid; gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: baseline; gap: 12px; }
.feature-list li::before { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--green); content: ""; }
.tour-media { display: flex; justify-content: center; padding-block: 6px; }
.tour-media .phone { --phone-width: 270px; }

.camera-section { background: var(--deep-green); color: var(--light-ink); }
.camera-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); grid-template-areas: "copy media" "details media"; align-items: center; column-gap: clamp(45px, 8vw, 115px); }
.camera-copy { grid-area: copy; align-self: end; max-width: 530px; }
.camera-details { grid-area: details; align-self: start; }
.camera-kicker { margin-bottom: 22px; color: var(--gold); font-size: .8rem; font-weight: 650; letter-spacing: .1em; }
.camera-copy h2 { font-size: clamp(2.5rem, 4.4vw, 4.15rem); line-height: 1.2; }
.camera-copy > p:not(.camera-kicker) { margin-top: 26px; color: #d6e4d9; font-size: 1.04rem; }
.camera-steps { display: grid; gap: 23px; margin: 36px 0 0; padding-left: 1.5em; }
.camera-steps li { padding-left: 10px; }
.camera-steps li::marker { color: var(--gold); font-weight: 650; }
.camera-steps h3 { font-size: 1.02rem; font-weight: 650; }
.camera-steps p { margin-top: 4px; color: #d6e4d9; font-size: .92rem; }
.camera-link { display: inline-flex; min-height: 44px; align-items: center; gap: 12px; margin-top: 28px; color: var(--light-ink); font-weight: 650; }
.camera-media { grid-area: media; min-width: 0; }
.camera-capture { --phone-width: 300px; margin-inline: auto; }
.camera-caption { max-width: 380px; margin: 20px auto 0; color: #d6e4d9; font-size: .78rem; text-align: center; }
.camera-section :focus-visible { outline-color: var(--gold); }

.handwriting-section { background: var(--paper); }
.handwriting-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 80px; align-items: center; }
.handwriting-copy h2 { font-size: clamp(3rem, 6vw, 5rem); font-weight: 600; font-family: var(--display-font); line-height: 1.22; }
.handwriting-copy > p { max-width: 500px; margin-top: 28px; color: var(--muted); font-size: 1.06rem; }
.writing-ways { display: grid; gap: 20px; margin: 38px 0 0; }
.writing-ways div { padding-top: 18px; border-top: 1px solid var(--rule); }
.writing-ways dt { margin-bottom: 5px; font-weight: 650; }
.writing-ways dd { margin: 0; color: var(--muted); font-size: .92rem; }
.handwriting-media { display: flex; justify-content: center; }
.handwriting-media .phone { --phone-width: 300px; transform: rotate(3deg); }

.faq-grid { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1fr); align-items: start; gap: clamp(45px, 8vw, 120px); }
.faq-heading h2 { font-size: clamp(2.4rem, 4.2vw, 3.8rem); line-height: 1.2; }
.faq-heading p { margin-top: 24px; color: var(--muted); }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list details:first-child { border-top: 1px solid var(--rule); }
.faq-list summary { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; list-style: none; font-weight: 650; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; color: var(--green); font-size: 1.4rem; font-weight: 400; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { padding-bottom: 26px; color: var(--muted); font-size: .96rem; }
.faq-link { display: inline-flex; min-height: 44px; align-items: center; margin-top: 18px; color: var(--green); font-weight: 600; }

.download-section { padding-block: 90px; background: var(--deep-green); color: var(--light-ink); }
.download-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 200px); align-items: center; gap: 75px; }
.download-copy h2 { font-size: clamp(2.7rem, 5vw, 4.6rem); line-height: 1.2; }
.download-copy p { max-width: 580px; margin-top: 24px; color: #d6e4d9; }
.download-copy .actions { justify-content: start; }
.download-copy .button { background: var(--light-ink); color: var(--deep-green); }
.download-copy .button:hover { background: var(--gold); }
.download-icon { width: min(100%, 190px); margin-inline: auto; }
.download-icon img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 22%; box-shadow: 0 12px 28px rgba(17, 42, 34, .22); }
.download-icon figcaption { margin-top: 12px; color: #d6e4d9; font-size: .8rem; text-align: center; }
.download-section :focus-visible { outline-color: var(--gold); }
.site-footer { padding-block: 28px; background: var(--page); color: var(--muted); font-size: .8rem; }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer a { display: inline-flex; min-height: 44px; align-items: center; white-space: nowrap; }

@keyframes phone-arrive { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes panel-arrive { from { opacity: .6; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1020px) {
  .desktop-nav { gap: 18px; }
  .brand-subtitle { display: none; }
  .hero-devices { gap: 0; }
  .hero-phone--left { margin-right: -24px; }
  .hero-phone--right { margin-left: -24px; }
  .tour-panel { gap: 32px; }
  .tour-media .phone { --phone-width: 240px; }
  .handwriting-grid { gap: 45px; }
  .site-header, .navigation { height: 64px; min-height: 64px; }
  .desktop-nav { display: none; }
  .mobile-nav { display: block; }
  .mobile-nav > summary { display: flex; min-height: 44px; align-items: center; gap: 8px; padding-inline: 12px; list-style: none; font-size: .88rem; }
  .mobile-nav > summary::-webkit-details-marker { display: none; }
  .mobile-nav > summary::after { content: "+"; font-size: 1.1rem; }
  .mobile-nav[open] > summary::after { content: "−"; }
  .mobile-links { position: absolute; top: 72px; right: 18px; left: 18px; display: grid; padding: 14px; border: 1px solid var(--rule); border-radius: 20px; background: var(--page); box-shadow: var(--shadow); }
  .mobile-links a { padding-inline: 14px; }
  .mobile-links .download-link { margin-top: 8px; }
}

@media (max-width: 720px) {
  .container { width: calc(100% - 36px); }
  .hero { padding-top: 62px; }
  .hero-devices { margin-top: 45px; }
  .hero-phone { --phone-width: 250px; }
  .hero-phone--left, .hero-phone--right { --phone-width: 205px; }
  .hero-phone--left { margin-right: -80px; }
  .hero-phone--right { margin-left: -80px; }
  .tour-panel, .handwriting-grid, .faq-grid, .camera-grid { grid-template-columns: minmax(0, 1fr); }
  .tour-panel { padding: 32px 24px 40px; gap: 40px; border-radius: 24px; }
  .tour-copy { max-width: 100%; }
  .tour-media .phone { --phone-width: 260px; }
  .tour-tab { padding-inline: 20px; }
  .handwriting-copy { max-width: 540px; }
  .handwriting-media .phone { --phone-width: 270px; }
  .download-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 150px); gap: 30px; }
  .camera-copy { max-width: 100%; }
  .camera-grid { grid-template-areas: "copy" "media" "details"; gap: 45px; }
  .camera-steps { margin-top: 0; }
  .camera-capture { --phone-width: 265px; }
  .download-icon { width: min(100%, 150px); }
}

@media (max-width: 480px) {
  .hero-copy { padding-inline: 18px; }
  .hero h1 { font-size: clamp(2.35rem, 9.4vw, 3rem); }
  .hero:lang(en) h1 { font-size: clamp(2rem, 8.4vw, 2.7rem); }
  .hero-lead { max-width: 340px; font-size: .97rem; }
  .actions { gap: 10px; }
  .button { gap: 10px; padding-inline: 20px; font-size: .9rem; }
  .hero-devices { padding-bottom: 40px; }
  .hero-phone { --phone-width: 245px; }
  .hero-phone--left, .hero-phone--right { display: none; }
  .hero-caption { max-width: 300px; margin-inline: auto; }
  .section-heading { margin-bottom: 32px; }
  .section-heading h2 { font-size: 2.25rem; }
  .section-heading p { font-size: .96rem; }
  .tour-tabs { width: 100%; border-radius: 24px; }
  .tour-tab { padding-inline: 18px; }
  .tour-copy h3 { font-size: 1.85rem; }
  .tour-copy > p { font-size: .96rem; }
  .feature-list { font-size: .92rem; }
  .camera-copy h2 { font-size: 2.15rem; }
  .handwriting-copy h2 { font-size: 3.2rem; }
  .download-grid { grid-template-columns: minmax(0, 1fr); }
  .download-copy .actions { justify-content: start; }
  .download-icon { width: 140px; margin-top: 20px; }
  .footer-grid { align-items: start; flex-direction: column; gap: 12px; }
  .footer-links { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .handwriting-media .phone { transform: none; }
}

.tour-note { max-width: 750px; margin: 28px auto 0; color: var(--muted); font-size: .94rem; text-align: center; }
.tour-note strong { color: var(--ink); font-weight: 600; }
