:root {
    color-scheme: light;
    --background: #f7f6f2;
    --surface: #ffffff;
    --surface-muted: #edece6;
    --text: #171915;
    --text-muted: #5f625c;
    --line: #d9d9d1;
    --accent: #356859;
    --accent-deep: #234a3f;
    --accent-soft: #dce9e3;
    --shadow: 0 24px 70px rgba(33, 50, 43, 0.12);
    --header-background: rgba(247, 246, 242, 0.88);
    --hero-mark-start: #dce9e3;
    --hero-mark-end: #bbd2c8;
    --product-visual-start: #dce9e3;
    --product-visual-end: #b8d0c5;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --background: #141713;
    --surface: #1e221e;
    --surface-muted: #191d19;
    --text: #f2f3ed;
    --text-muted: #b3b8ae;
    --line: #393e38;
    --accent: #8fc6b2;
    --accent-deep: #b9ddcf;
    --accent-soft: #29443a;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    --header-background: rgba(20, 23, 19, 0.88);
    --hero-mark-start: #29443a;
    --hero-mark-end: #1e352d;
    --product-visual-start: #29443a;
    --product-visual-end: #1e352d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
    line-height: 1.7;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { overflow-wrap: anywhere; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid rgba(217, 217, 209, 0.8);
    background: var(--header-background);
    backdrop-filter: blur(18px);
}

.site-header__inner,
.hero,
.section,
.site-footer {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
}

.site-header__inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.site-header__actions,
.site-preferences,
.preference-group {
    display: flex;
    align-items: center;
}

.site-header__actions { gap: 24px; }
.site-preferences { gap: 8px; }

.site-header--noteflow {
    border-bottom-color: rgba(229, 231, 235, 0.72);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
}

html[data-theme="dark"] .site-header--noteflow {
    border-bottom-color: rgba(31, 41, 55, 0.72);
    background: rgba(10, 10, 10, 0.82);
}

.site-header--noteflow .site-header__inner {
    width: min(1280px, calc(100% - 32px));
    min-height: 64px;
}

.site-header__desktop-actions,
.site-header__mobile-actions {
    display: flex;
    align-items: center;
}

.site-header__desktop-actions { gap: 4px; }
.site-header__mobile-actions { display: none; gap: 8px; }

.site-header--noteflow .site-nav { gap: 4px; }
.site-header--noteflow .site-nav a {
    padding: 8px 16px;
    border-radius: 999px;
    transition: color 180ms ease, background-color 180ms ease;
}
.site-header--noteflow .site-nav a:hover {
    background: #f3f4f6;
    color: #111827;
}
html[data-theme="dark"] .site-header--noteflow .site-nav a:hover {
    background: #1f2937;
    color: #ffffff;
}

.site-nav__divider {
    width: 1px;
    height: 16px;
    margin-inline: 8px;
    background: #d1d5db;
}
html[data-theme="dark"] .site-nav__divider { background: #374151; }

.site-logo--with-mark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.site-logo__mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #111111;
    color: #ffffff;
    font-family: Georgia, serif;
    font-size: 1rem;
    line-height: 1;
    transition: color 180ms ease, background-color 180ms ease;
}
html[data-theme="dark"] .site-logo__mark {
    background: #ffffff;
    color: #111111;
}

.site-icon-button {
    width: 36px;
    height: 36px;
    padding: 8px;
    border: 0;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: transparent;
    color: #4b5563;
    cursor: pointer;
    transition: color 180ms ease, background-color 180ms ease;
}
.site-icon-button:hover {
    background: #f3f4f6;
    color: #111111;
}
.site-icon-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
html[data-theme="dark"] .site-icon-button { color: #d1d5db; }
html[data-theme="dark"] .site-icon-button:hover {
    background: #1f2937;
    color: #ffffff;
}
.site-icon-button svg,
.site-language-menu svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-language-selector { position: relative; }
.site-language-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 160px;
    padding-block: 4px;
    overflow: hidden;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.14);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transform-origin: top right;
    transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
}
.site-language-selector:focus-within .site-language-menu,
.site-language-selector.is-open .site-language-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
html[data-theme="dark"] .site-language-menu {
    border-color: #1f2937;
    background: #111827;
}
.site-language-menu button {
    width: 100%;
    padding: 9px 16px;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    color: #374151;
    cursor: pointer;
    font: inherit;
    font-size: 0.875rem;
    text-align: left;
}
.site-language-menu button:hover { background: #f9fafb; }
html[data-theme="dark"] .site-language-menu button { color: #e5e7eb; }
html[data-theme="dark"] .site-language-menu button:hover { background: #1f2937; }
.site-language-check { visibility: hidden; width: 14px !important; height: 14px !important; }
.site-language-menu button[aria-pressed="true"] .site-language-check { visibility: visible; }

.site-theme-icon--sun,
.site-menu-icon--close { display: none; }
html[data-theme="dark"] .site-theme-icon--moon { display: none; }
html[data-theme="dark"] .site-theme-icon--sun { display: block; }
[data-site-menu-toggle][aria-expanded="true"] .site-menu-icon--open { display: none; }
[data-site-menu-toggle][aria-expanded="true"] .site-menu-icon--close { display: block; }

.site-mobile-menu {
    padding: 8px 16px 20px;
    border-top: 1px solid #f3f4f6;
    background: #ffffff;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.08);
}
html[data-theme="dark"] .site-mobile-menu {
    border-top-color: #1f2937;
    background: #111827;
}
.site-mobile-menu nav { display: grid; gap: 4px; }
.site-mobile-menu nav a {
    padding: 10px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}
.site-mobile-menu nav a:hover { background: #f9fafb; color: var(--text); }
html[data-theme="dark"] .site-mobile-menu nav a:hover { background: #1f2937; }
.site-mobile-menu__language { padding: 14px 16px 0; }
.site-mobile-menu__language > span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.site-mobile-menu__language > div { display: flex; gap: 8px; }
.site-mobile-menu__language button {
    padding: 6px 12px;
    border: 0;
    border-radius: 6px;
    background: #f3f4f6;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
}
.site-mobile-menu__language button[aria-pressed="true"] {
    background: #111111;
    color: #ffffff;
}
html[data-theme="dark"] .site-mobile-menu__language button { background: #1f2937; }
html[data-theme="dark"] .site-mobile-menu__language button[aria-pressed="true"] {
    background: #ffffff;
    color: #111111;
}

.preference-group {
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}

.preference-button {
    min-height: 30px;
    padding: 5px 9px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
}

.preference-button[aria-pressed="true"] {
    background: var(--text);
    color: var(--background);
}

.preference-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.site-logo {
    font-size: 1.15rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.site-nav,
.site-footer nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-nav a,
.site-footer nav a {
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
}

.site-nav a:hover,
.site-footer nav a:hover { color: var(--text); }

.hero {
    min-height: 560px;
    padding-block: 80px;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    align-items: center;
    gap: 80px;
}

.hero__content { max-width: 750px; }
.eyebrow {
    margin: 0 0 18px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(2.9rem, 5vw, 4.5rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero__lead {
    max-width: 640px;
    margin: 32px 0 0;
    color: var(--text-muted);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero__actions {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    min-height: 48px;
    padding: 11px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-decoration: none;
}
.button--primary { background: var(--accent); color: #fff; }
.button--primary:hover { background: var(--accent-deep); }
.button--secondary { border-color: var(--line); background: var(--surface); }

.hero__mark {
    width: min(100%, 165px);
    aspect-ratio: 1;
    border-radius: 38% 62% 57% 43% / 46% 43% 57% 54%;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--hero-mark-start), var(--hero-mark-end));
    color: var(--accent-deep);
    box-shadow: var(--shadow);
    transform: rotate(5deg);
    justify-self: end;
}
.hero__mark span {
    font-family: Georgia, serif;
    font-size: clamp(4rem, 7vw, 5rem);
    line-height: 1;
    transform: rotate(-5deg);
}

.section { padding-block: 112px; }
.section-heading {
    margin-bottom: 48px;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 0.65fr);
    align-items: end;
    gap: 56px;
}

.section-heading h2,
.about h2,
.blog-hero h1 {
    margin: 0;
    font-size: clamp(2.35rem, 4.6vw, 4.25rem);
    line-height: 1.12;
    letter-spacing: -0.045em;
}
.section-heading > p,
.about > p:last-child,
.blog-hero > p:last-child { margin: 0; color: var(--text-muted); }

.section-heading h2.catchphrase,
.about h2.catchphrase {
    font-size: clamp(1.75rem, 3.2vw, 2.75rem);
    line-height: 1.16;
}
.catchphrase {
    display: flex;
    flex-wrap: wrap;
    overflow-wrap: normal;
    word-break: normal;
}
.catchphrase > span { white-space: nowrap; }
html[lang="en"] .catchphrase { column-gap: 0.24em; }

.product-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 32px;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.product-card__visual {
    height: 520px;
    padding: 32px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    overflow: hidden;
    background: linear-gradient(160deg, var(--product-visual-start) 0%, var(--product-visual-end) 100%);
}
.product-card__visual img {
    width: auto;
    height: 100%;
    max-width: calc(50% - 9px);
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(28, 48, 40, 0.18);
}

.product-card__content {
    padding: clamp(44px, 7vw, 88px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.product-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 650;
}
.pill {
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-deep);
}
.product-card h3 {
    margin: 22px 0 16px;
    font-size: clamp(2.5rem, 5vw, 4.8rem);
    line-height: 1;
    letter-spacing: -0.05em;
}
.product-card__content > p { margin: 0; color: var(--text-muted); font-size: 1.08rem; }
.product-links {
    margin: 34px 0 0;
    padding: 24px 0 0;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 18px 24px;
    list-style: none;
}
.product-links a {
    color: var(--accent-deep);
    font-size: 0.92rem;
    font-weight: 700;
    text-underline-offset: 4px;
}

.section--muted { position: relative; }
.section--muted::before {
    content: "";
    position: absolute;
    inset: 28px -32px;
    z-index: -1;
    border-radius: 40px;
    background: var(--surface-muted);
}
.blog-card {
    padding: 34px 36px;
    border: 1px solid var(--line);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    background: var(--surface);
    text-decoration: none;
}
.blog-card:hover { border-color: var(--accent); }
.blog-card__label {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.blog-card h3 { margin: 0; font-size: 1.45rem; }
.blog-card div > p:last-child { margin: 6px 0 0; color: var(--text-muted); }
.blog-card > span { font-size: 2rem; }

.about {
    max-width: 820px;
    margin-inline: max(24px, calc((100vw - 1180px) / 2));
}
.about h2 { margin-bottom: 26px; }

.site-footer {
    min-height: 160px;
    padding-block: 44px;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px 32px;
}
.site-footer p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.site-footer--noteflow {
    min-height: auto;
    padding-block: 48px;
    display: flex;
    grid-template-columns: none;
    justify-content: space-between;
    gap: 24px;
}
.site-footer--noteflow p {
    grid-column: auto;
    color: #9ca3af;
    font-size: 0.875rem;
}
.site-footer--noteflow nav { gap: 32px; }
.site-footer--noteflow nav a { font-size: 0.875rem; font-weight: 400; }

.blog-hero {
    min-height: 520px;
    padding-block: 112px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.blog-hero > p:last-child {
    max-width: 620px;
    margin-top: 28px;
    font-size: 1.08rem;
}
.empty-state {
    padding: 56px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
}
.empty-state h2 { margin: 0 0 10px; font-size: 1.8rem; }
.empty-state p { margin: 0 0 28px; color: var(--text-muted); }

@media (max-width: 820px) {
    .site-header__inner, .hero, .section, .site-footer { width: min(100% - 32px, 680px); }
    .site-header__inner { min-height: 64px; }
    .site-header__inner { gap: 16px; }
    .site-nav { display: none; }
    .site-header__actions { gap: 0; }
    .site-header--noteflow .site-header__inner { width: calc(100% - 32px); }
    .site-header__desktop-actions { display: none; }
    .site-header__mobile-actions { display: flex; }
    .hero {
        min-height: auto;
        padding-block: 80px;
        grid-template-columns: 1fr;
        gap: 54px;
    }
    .hero__mark { width: min(36vw, 140px); justify-self: center; }
    .section { padding-block: 80px; }
    .section-heading, .product-card { grid-template-columns: 1fr; }
    .section-heading { gap: 20px; }
    .product-card__visual {
        height: 280px;
        padding: 20px 16px;
        gap: 12px;
    }
    .product-card__visual img { max-width: calc(50% - 6px); border-radius: 12px; }
    .section--muted::before { inset-inline: -16px; border-radius: 28px; }
    .about { margin-inline: auto; }
    .site-footer--noteflow {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }
    .site-footer--noteflow nav { align-self: flex-start; }
    .site-footer--noteflow p { align-self: flex-end; text-align: right; }
}

@media (max-width: 520px) {
    h1 { font-size: clamp(2.5rem, 11vw, 3.25rem); }
    .site-preferences { gap: 5px; }
    .preference-button { min-height: 28px; padding-inline: 7px; font-size: 0.68rem; }
    .product-card, .section--muted::before { border-radius: 24px; }
    .product-card__content, .empty-state { padding: 34px 26px; }
    .blog-card { padding: 28px 24px; }
    .site-footer { grid-template-columns: 1fr; }
    .site-footer p { grid-column: 1; }
}

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