/* =========================================================
   COTOME トップページ（home.html）
   チラシの紙面のように、太い見出し・余白・散らした名刺で組む。
   ========================================================= */

.home {
    --wrap: 1200px;
    --gutter: clamp(20px, 4.5vw, 56px);
    font-size: 16px;
}

.home main {
    overflow-x: clip;
}

/* ---------- ヘッダー ---------- */
.home-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: saturate(1.3) blur(10px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.home-header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: var(--wrap);
    height: 68px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.home-nav {
    display: flex;
    gap: 26px;
    margin-left: auto;
    font-size: 14.5px;
    font-weight: 700;
}

.home-nav a {
    color: var(--ink-2);
    text-decoration: none;
    white-space: nowrap;
}

.home-nav a:hover {
    color: var(--accent);
}

.home-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: 18px;
}

.home-login {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--ink);
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none;
}

.home-login:hover {
    color: var(--accent);
}

/* ---------- ヒーロー ---------- */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: center;
    gap: clamp(24px, 4vw, 56px);
    max-width: var(--wrap);
    margin: 0 auto;
    padding: clamp(36px, 6vw, 72px) var(--gutter) clamp(48px, 7vw, 96px);
}

.hero-copy {
    display: grid;
    justify-items: start;
    gap: 22px;
    min-width: 0;
}

.hero-title {
    margin: 0;
    font-size: clamp(36px, 5.6vw, 68px);
    line-height: 1.22;
    letter-spacing: 0.01em;
}

.hero-accent {
    color: var(--coral);
}

.hero-lead {
    margin: 0;
    color: var(--ink);
    font-size: clamp(16px, 1.6vw, 19px);
    font-weight: 700;
    line-height: 1.9;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}

.hero-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    color: var(--ink-2);
    font-size: 14px;
}

.hero-note svg {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 3px;
    fill: none;
    stroke: var(--success);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 右側：案内役＋実際の作例。人物は右60%、作例は左下の空きに置く */
.hero-visual {
    position: relative;
    width: 100%;
    max-width: 560px;
    justify-self: end;
    aspect-ratio: 4 / 5;
}

.hero-mascot {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: url("assets/mascot-hero.webp") right bottom / contain no-repeat;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-blob--lav {
    top: 6%;
    right: -4%;
    width: 78%;
    aspect-ratio: 1;
    background: radial-gradient(circle at 40% 40%, var(--lav-soft) 0 62%, transparent 63%);
}

.hero-blob--mint {
    bottom: 10%;
    left: -2%;
    width: 46%;
    aspect-ratio: 1;
    background: radial-gradient(circle, var(--mint-soft) 0 60%, transparent 61%);
}

.hero-spark {
    position: absolute;
    z-index: 2;
    fill: var(--butter);
    stroke: color-mix(in srgb, var(--butter) 60%, var(--ink) 40%);
    stroke-width: 0.8;
    pointer-events: none;
}

.hero-spark--1 { top: 4%; left: 14%; width: 34px; height: 34px; transform: rotate(-8deg); }
.hero-spark--2 { top: 30%; left: 2%; width: 20px; height: 20px; fill: var(--lav); stroke: none; }
.hero-spark--3 { bottom: 4%; right: 6%; width: 26px; height: 26px; fill: var(--pink); stroke: none; }

.hero-card {
    position: absolute;
    left: -6%;
    bottom: 7%;
    z-index: 3;
    display: block;
    width: 58%;
    padding: 0;
    background: var(--paper);
    border-radius: 4px;
    box-shadow: var(--shadow-card);
    transform: rotate(-5deg);
    transition: transform 0.3s var(--ease);
}

.hero-card:hover,
.hero-card:focus-visible {
    transform: rotate(-3deg) translateY(-4px);
}

.hero-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.hero-card-tag {
    position: absolute;
    right: 8px;
    bottom: -16px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transform: rotate(5deg);
}

/* ---------- セクション共通 ---------- */
.section {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: clamp(56px, 8vw, 104px) var(--gutter);
}

.section-head {
    display: grid;
    gap: 10px;
    max-width: 720px;
    margin-bottom: clamp(28px, 4vw, 48px);
}

.section-title {
    margin: 0;
    font-size: clamp(28px, 3.6vw, 42px);
}

.section-lead {
    margin: 0;
    color: var(--ink-2);
    font-size: 16px;
}

/* ---------- できること：罫線で3分割 ---------- */
.feature-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 16px;
    padding: 6px clamp(16px, 2.6vw, 32px);
}

.feature + .feature {
    border-left: 1.5px dashed var(--line-strong);
}

.feature:first-child {
    padding-left: 0;
}

.feature h3 {
    margin: 4px 0 8px;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 900;
    line-height: 1.45;
}

.feature p {
    margin: 0;
    color: var(--ink-2);
    font-size: 15px;
}

.feature-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 0;
    margin: clamp(32px, 4vw, 48px) 0 0;
    padding: 14px 20px;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 700;
}

.feature-strip span {
    padding: 0 18px;
}

.feature-strip span + span {
    border-left: 1.5px solid var(--line-strong);
}

/* ---------- 使いどころ：作例と手順のあいだに小さく置く ---------- */
.occasions {
    padding-top: clamp(16px, 3vw, 32px);
    padding-bottom: clamp(16px, 3vw, 32px);
    text-align: center;
}

.occasions .section-head {
    margin: 0 auto 16px;
    justify-items: center;
}

.occasions-title {
    margin: 0;
    font-size: clamp(20px, 2.6vw, 26px);
    font-weight: 900;
}

.occasions .feature-strip {
    margin-top: 0;
}

/* ---------- 作例 ---------- */
.example {
    padding-top: clamp(24px, 4vw, 48px);
}

.example-board {
    position: relative;
    padding: clamp(28px, 5vw, 64px);
    border-radius: var(--radius-xl);
    background-color: var(--lav-soft);
    background-image: radial-gradient(color-mix(in srgb, var(--lav) 45%, transparent) 1.2px, transparent 1.6px);
    background-size: 20px 20px;
}

.example-head {
    margin-bottom: clamp(32px, 4vw, 52px);
}

.example-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(24px, 4vw, 56px);
    align-items: start;
}

.example-card {
    position: relative;
    margin: 0;
    padding: 0;
}

.example-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 5px;
    background: var(--paper);
    box-shadow: var(--shadow-card);
}

.example-card--front {
    transform: rotate(-2.2deg);
}

.example-card--back {
    margin-top: clamp(16px, 4vw, 48px);
    transform: rotate(1.8deg);
}

.example-card figcaption {
    margin-top: 14px;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-align: center;
}

.example-notes {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(20px, 3vw, 40px);
    margin-top: clamp(32px, 4vw, 52px);
    padding: clamp(20px, 3vw, 28px);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.example-spec {
    display: grid;
    gap: 10px;
    margin: 0;
}

.example-spec div {
    display: grid;
    grid-template-columns: 6.5em 1fr;
    gap: 12px;
}

.example-spec dt {
    color: var(--ink-3);
    font-size: 13.5px;
    font-weight: 700;
}

.example-spec dd {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.example-caution {
    margin: 0;
    padding-left: clamp(0px, 3vw, 40px);
    border-left: 1.5px dashed var(--line-strong);
    color: var(--ink-2);
    font-size: 14.5px;
}

.example-caution strong {
    color: var(--ink);
}

.example-more {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 18px;
    margin: clamp(24px, 3vw, 36px) 0 0;
}

.example-more-note {
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 600;
}

/* ---------- つくりかた：罫線ノート ---------- */
.how-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: clamp(24px, 3vw, 36px) clamp(12px, 2vw, 24px);
    list-style: none;
    border-radius: var(--radius-lg);
    background-color: var(--surface);
    background-image: repeating-linear-gradient(transparent 0 33px, color-mix(in srgb, var(--lav) 26%, transparent) 33px 34px);
    box-shadow: var(--shadow-md);
}

.how-step {
    position: relative;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 4px clamp(12px, 2vw, 24px);
}

.how-step + .how-step::before {
    content: "";
    position: absolute;
    top: 20px;
    left: -9px;
    width: 18px;
    height: 18px;
    border-top: 2.5px solid var(--accent);
    border-right: 2.5px solid var(--accent);
    transform: rotate(45deg) scale(0.7);
}

.how-no {
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--pink-soft);
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 900;
}

.how-no--lav { background: var(--lav-soft); color: #6a4fc0; }
.how-no--mint { background: var(--mint-soft); color: #2b7f66; }
.how-no--butter { background: var(--butter-soft); color: #7d6000; }

:root[data-theme="dark"] .how-no--lav { color: var(--lav); }
:root[data-theme="dark"] .how-no--mint { color: var(--mint); }
:root[data-theme="dark"] .how-no--butter { color: var(--butter); }

.how-step h3 {
    margin: 6px 0 0;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.5;
}

.how-step p {
    margin: 0;
    color: var(--ink-2);
    font-size: 15px;
    line-height: 34px;
}

/* ---------- 無料と有料 ---------- */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 36px);
}

.plan {
    padding: clamp(22px, 3vw, 34px);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.plan--free {
    border-color: color-mix(in srgb, var(--mint) 70%, transparent);
    box-shadow: 6px 6px 0 var(--mint-soft);
}

.plan--paid {
    box-shadow: 6px 6px 0 var(--butter-soft);
    border-color: color-mix(in srgb, var(--butter) 80%, transparent);
}

.plan h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 900;
}

.plan-tag {
    padding: 2px 12px;
    border-radius: 999px;
    background: var(--mint-soft);
    color: #23634f;
    font-size: 13px;
    letter-spacing: 0.08em;
}

.plan-tag--paid {
    background: var(--butter-soft);
    color: #6e5400;
}

:root[data-theme="dark"] .plan-tag { color: var(--mint); }
:root[data-theme="dark"] .plan-tag--paid { color: var(--butter); }

.plan-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.plan-list li {
    position: relative;
    padding-left: 26px;
    font-size: 15px;
}

.plan-list li::before {
    content: "";
    position: absolute;
    top: 0.62em;
    left: 4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent-line);
}

.plan-note {
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1.5px dashed var(--line);
    color: var(--ink-2);
    font-size: 14px;
}

/* ---------- 印刷データ：チケット ---------- */
.print {
    padding-top: 0;
}

.print-ticket {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(16px, 3vw, 28px);
    padding: clamp(22px, 3vw, 32px);
    border: 1.5px dashed color-mix(in srgb, var(--mint) 80%, var(--ink) 20%);
    border-radius: var(--radius-lg);
    background: var(--mint-soft);
}

.print-title {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 900;
}

.print-spec-list {
    display: grid;
    gap: 6px;
    margin: 0;
}

.print-spec-list div {
    display: grid;
    grid-template-columns: 5.5em 1fr;
    gap: 12px;
}

.print-spec-list dt {
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 700;
}

.print-spec-list dd {
    margin: 0;
    font-size: 15px;
}

.print-note {
    margin: 12px 0 0;
    color: var(--ink-2);
    font-size: 14px;
}

/* ---------- 締め ---------- */
.closing {
    padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(64px, 8vw, 104px);
}

.closing-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(160px, 260px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(20px, 4vw, 48px);
    max-width: 960px;
    margin: 0 auto;
    padding: clamp(28px, 4vw, 48px);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.closing-inner::after {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1.5px dashed var(--accent-line);
    border-radius: calc(var(--radius-xl) - 8px);
    pointer-events: none;
}

.closing-mascot {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        url("assets/mascot-wave.webp") center / 92% no-repeat,
        radial-gradient(circle, var(--lav-soft) 0 64%, transparent 65%);
}

.closing-copy {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: start;
    gap: 16px;
}

.closing-title {
    margin: 0;
    font-size: clamp(28px, 3.8vw, 44px);
}

.closing-copy p {
    margin: 0;
    color: var(--ink-2);
}

.closing-sub {
    font-size: 14px;
}

/* ---------- フッター ---------- */
.home-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.home-footer .site-footer {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 28px var(--gutter) 36px;
}

.home-footer p {
    margin: 0;
}

/* サイト内の案内（作例一覧・記事）を、規約のリンクの上に別のまとまりで置く */
.footer-links {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.footer-links nav {
    justify-content: flex-end;
}

.footer-site-nav {
    font-size: 14px;
    font-weight: 700;
}

/* ---------- レスポンシブ ---------- */
/* ナビが表示される最も狭い幅でも、項目を1行に収める */
@media (max-width: 1180px) {
    .home-nav {
        gap: 18px;
    }
}

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

    .home-footer .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        justify-items: start;
    }

    .footer-links nav {
        justify-content: flex-start;
    }

    .home-header-actions {
        margin-left: auto;
    }

    .how-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 24px;
    }

    .how-step:nth-child(3)::before {
        display: none;
    }
}

@media (max-width: 860px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .hero-visual {
        justify-self: center;
        max-width: 440px;
    }

    .hero-card {
        left: 0;
        width: 60%;
    }

    .feature-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .feature,
    .feature:first-child {
        padding: 0;
    }

    .feature + .feature {
        padding-top: 24px;
        border-left: 0;
        border-top: 1.5px dashed var(--line-strong);
    }

    .feature-strip {
        border-radius: var(--radius-lg);
    }

    .example-notes,
    .plan-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .example-caution {
        padding: 16px 0 0;
        border-left: 0;
        border-top: 1.5px dashed var(--line-strong);
    }

    .closing-inner {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        text-align: center;
    }

    .closing-mascot {
        width: min(200px, 60%);
    }

    .closing-copy {
        justify-items: center;
    }
}

@media (max-width: 600px) {
    .home {
        font-size: 15.5px;
    }

    .home-header-inner {
        height: 60px;
        gap: 10px;
    }

    .home-header .dev-badge {
        display: none;
    }

    .home-header-actions {
        gap: 8px;
        margin-left: auto;
    }

    .home-login {
        font-size: 14px;
    }

    .hero-title {
        font-size: clamp(32px, 9.6vw, 40px);
    }

    .hero-cta,
    .hero-cta .btn {
        width: 100%;
    }

    .tape-label {
        font-size: 12.5px;
    }

    .example-board {
        margin: 0 calc(var(--gutter) * -0.5);
        padding: 28px 18px;
    }

    .example-cards {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }

    .example-card--back {
        margin-top: 0;
    }

    .example-more .btn {
        width: 100%;
    }

    .example-spec div,
    .print-spec-list div {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

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

    .how-step + .how-step::before {
        display: none;
    }

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

    .feature-strip span {
        padding: 0;
        width: 100%;
        text-align: center;
    }

    .feature-strip span + span {
        border-left: 0;
    }

    .closing-copy .btn {
        width: 100%;
    }
}

@media (max-width: 340px) {
    .home-login {
        display: none;
    }
}

/* ---------- よくある質問：押すと答えが開く（details・summary） ---------- */
/* 幅が足りないときは、語の途中ではなく文節の切れ目で折り返す */
.faq .section-title span {
    display: inline-block;
}

.faq-list {
    display: grid;
    gap: 12px;
    max-width: 860px;
}

.faq-item {
    border: 1.5px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.faq-item summary {
    position: relative;
    padding: 18px 56px 18px 22px;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.6;
    word-break: auto-phrase;
    cursor: pointer;
    list-style: none;
}

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

.faq-item summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 22px;
    color: var(--accent);
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    transform: translateY(-50%);
}

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

.faq-item p {
    margin: 0;
    padding: 0 22px 20px;
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.9;
}
