/* Pictopoem site — shared by every language. Colors come from the app icon. */

:root {
    --paper: #fbf8f3;
    --cream: #f6efe8;
    --ink: #2a2321;
    --muted: #6e6460;
    --line: #e6dcd2;
    --accent: #961e33;
    --accent-dark: #7a1829;
    --radius: 14px;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html[lang="ja"] {
    --serif: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

html[lang="zh-Hans"] {
    --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", STSong, serif;
    --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

html[lang="zh-Hant"] {
    --serif: "Songti TC", "Noto Serif TC", "Source Han Serif TC", PMingLiU, serif;
    --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--sans);
    line-height: 1.7;
    color: var(--ink);
    background: var(--paper);
}

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

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */

.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 600;
}

.brand:hover {
    text-decoration: none;
}

.brand img {
    width: 36px;
    height: 36px;
    border-radius: 9px;
}

.brand small {
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--muted);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.95rem;
}

.site-nav a {
    color: var(--ink);
}

.section-links {
    display: flex;
    gap: 20px;
}

.lang-switch {
    display: flex;
    gap: 4px;
    font-size: 0.85rem;
}

.lang-switch a {
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--muted);
}

.lang-switch a[aria-current="page"] {
    background: var(--cream);
    color: var(--ink);
}

/* Sections */

section {
    padding: 72px 0;
}

section + section {
    border-top: 1px solid var(--line);
}

h1,
h2,
h3 {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.3;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    text-align: center;
    margin-bottom: 12px;
}

.section-lede {
    max-width: 640px;
    margin: 0 auto 44px;
    text-align: center;
    color: var(--muted);
}

.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 140px;
    margin: 18px 0 22px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.divider span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* Hero */

.hero {
    background: linear-gradient(180deg, var(--cream), var(--paper));
    padding: 64px 0 72px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.eyebrow {
    color: var(--accent);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    margin-top: 8px;
}

/* Keeps CJK headlines from breaking inside a phrase (e.g. 短|歌) */
.phrase {
    display: inline-block;
}

.hero .lede {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 34em;
    margin-bottom: 28px;
}

.hero-meta {
    margin-top: 14px;
    font-size: 0.875rem;
    color: var(--muted);
}

.phone {
    max-width: 300px;
    margin: 0 auto;
    border-radius: 44px;
    filter: drop-shadow(0 18px 40px rgba(42, 35, 33, 0.18));
}

/* Screens without a device frame get one drawn around them */
.phone.framed {
    border: 10px solid #1d1a19;
    border-radius: 46px;
    overflow: hidden;
    background: #1d1a19;
}

/* App Store button */

.app-store-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 22px;
    border-radius: 12px;
    background: #000;
    color: #fff;
    transition: background-color 0.2s ease;
}

.app-store-button:hover {
    background: #333;
    text-decoration: none;
}

.app-store-button svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.app-store-button span {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: left;
}

.app-store-button small {
    font-size: 0.72rem;
}

.app-store-button strong {
    font-size: 1.3rem;
    font-weight: 500;
}

/* Steps */

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    list-style: none;
    counter-reset: step;
}

.steps li {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 24px;
    counter-increment: step;
}

.steps li::before {
    content: counter(step);
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-family: var(--serif);
}

.steps h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.steps p {
    color: var(--muted);
}

/* Poem forms */

.forms {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.form {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
}

.form h3 {
    font-size: 1.15rem;
    margin-bottom: 4px;
    color: var(--accent);
}

.form p {
    font-size: 0.95rem;
    color: var(--muted);
}

.note {
    max-width: 720px;
    margin: 36px auto 0;
    padding: 20px 24px;
    border-left: 3px solid var(--accent);
    background: var(--cream);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.note h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

/* Side-by-side vertical poems (Chinese pages) */

.poem-pair {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.poem-pair figure {
    text-align: center;
}

.vertical-poem {
    writing-mode: vertical-rl;
    font-family: var(--serif);
    font-size: 1.5rem;
    line-height: 2.1;
    letter-spacing: 0.18em;
    height: 9.5em;
    margin: 0 auto;
    padding: 24px 28px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.poem-pair + .features {
    margin-top: 56px;
}

.poem-pair figcaption {
    margin-top: 10px;
    font-size: 0.875rem;
    color: var(--muted);
}

/* Features */

.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 48px;
    list-style: none;
    max-width: 920px;
    margin: 0 auto;
}

.features h3 {
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.features p {
    color: var(--muted);
}

/* Gallery */

.gallery {
    columns: 4 220px;
    column-gap: 20px;
}

.gallery figure {
    break-inside: avoid;
    margin-bottom: 28px;
}

.gallery button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.gallery img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 4px 14px rgba(42, 35, 33, 0.12);
}

.gallery figcaption {
    margin-top: 12px;
    padding: 0 4px;
    font-family: var(--serif);
    font-size: 0.95rem;
    line-height: 1.6;
}

.gallery figcaption .poem {
    white-space: pre-line;
}

.gallery figcaption .meta {
    display: block;
    margin-top: 6px;
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--muted);
}

.lightbox {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: min(92vw, 640px);
    max-height: 92vh;
    margin: auto;
}

.lightbox::backdrop {
    background: rgba(20, 16, 15, 0.8);
}

.lightbox img {
    max-height: 88vh;
    width: auto;
    border-radius: var(--radius);
}

.lightbox button {
    position: fixed;
    top: 12px;
    right: 18px;
    border: 0;
    background: none;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
}

/* FAQ */

.faq {
    max-width: 760px;
    margin: 0 auto;
}

.faq details {
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    color: var(--accent);
    font-size: 1.3rem;
    line-height: 1.2;
}

.faq details[open] summary::after {
    content: "−";
}

.faq details p {
    margin-top: 10px;
    color: var(--muted);
}

/* Closing call to action */

.cta {
    text-align: center;
    background: var(--cream);
}

.cta p {
    color: var(--muted);
    margin-bottom: 28px;
}

/* Footer */

.site-footer {
    padding: 32px 0 40px;
    font-size: 0.875rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer a {
    color: var(--muted);
}

/* Small screens */

@media (max-width: 820px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero .lede {
        margin-left: auto;
        margin-right: auto;
    }

    .hero .divider {
        margin-left: auto;
        margin-right: auto;
    }

    .phone {
        max-width: 240px;
    }

    .steps,
    .features {
        grid-template-columns: 1fr;
    }

    .site-nav .section-links {
        display: none;
    }

    .gallery {
        columns: 2;
        column-gap: 14px;
    }

    .gallery figcaption {
        font-size: 0.85rem;
    }

    section {
        padding: 56px 0;
    }
}
