@font-face {
  font-family: Inter;
  src: url("../assets/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --color-primary: #17294a;
  --color-primary-hover: #243f70;
  --color-accent: #3478e5;
  --color-text: #111318;
  --color-text-secondary: #626875;
  --color-background: #fff;
  --color-hero: #f0f3f8;
  --color-surface: #fff;
  --color-border: #dfe2e8;
  --color-muted: #f6f7f9;
  --color-success: #218653;
  --color-danger: #d94b4b;

  --radius: 14px;
  --header-height: 76px;
  --gutter: clamp(16px, 4vw, 40px);
  --transition: 180ms ease;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[x-cloak] { display: none !important; }

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

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 760px; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--color-primary); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 10px;
  font-size: 0.9375rem; font-weight: 600; text-decoration: none;
  transition: background var(--transition), border-color var(--transition), transform 80ms ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--color-primary-hover); }
.btn-primary.is-added { background: var(--color-success); }
.btn-outline { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-muted); }
.btn-large { min-height: 52px; width: 100%; font-size: 1rem; }
.btn-block { width: 100%; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 10px; background: transparent;
  transition: background var(--transition);
}
.icon-btn:hover { background: rgba(23, 41, 74, 0.08); }

.link, .link-plain {
  padding: 0; border: 0; background: none; text-align: left;
  font-size: inherit; color: var(--color-accent); text-decoration: underline; text-underline-offset: 3px;
}
.link-plain { color: inherit; text-decoration: none; }
.link-plain:hover { color: var(--color-accent); }
.link.center { display: block; margin: 12px auto 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--color-hero);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}
.site-header.is-scrolled { background: var(--color-background); border-color: var(--color-border); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-height); }

.logo { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.02em; color: var(--color-text); text-decoration: none; }

.nav-desktop { display: flex; gap: 36px; position: absolute; left: 50%; transform: translateX(-50%); }
.nav-desktop a { font-weight: 500; color: var(--color-text); text-decoration: none; transition: color var(--transition); }
.nav-desktop a:hover { color: var(--color-accent); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.btn-header { min-height: 46px; padding: 0 24px; }
.menu-btn { display: none; }

.badge {
  position: absolute; top: 2px; right: 0;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--color-accent); color: #fff;
  font-size: 0.6875rem; font-weight: 700; line-height: 18px; text-align: center;
}

.nav-mobile { display: none; }

/* ---------- Hero ---------- */

.hero { background: var(--color-hero); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 24px; padding-top: 48px; padding-bottom: 48px; min-height: 520px; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); line-height: 1.04; font-weight: 800; letter-spacing: -0.035em; max-width: 11em; }
.hero-art { width: 100%; justify-self: end; }

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-muted { background: var(--color-muted); }
.eyebrow { font-size: 1rem; color: var(--color-text); margin-bottom: 8px; }
.section-title { font-size: clamp(1.75rem, 3.2vw, 2.25rem); line-height: 1.15; font-weight: 800; letter-spacing: -0.025em; }
.section-text { margin-top: 12px; color: var(--color-text-secondary); max-width: 40em; }
.count { margin-top: 8px; font-size: 0.875rem; color: var(--color-text-secondary); }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }

.card {
  display: flex; flex-direction: column;
  padding: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius);
  transition: border-color var(--transition);
}
.card:hover, .card:focus-within { border-color: #b9c0cf; }

.card-media { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--color-muted); aspect-ratio: 16 / 10; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 250ms ease; }
.card:hover .card-media img { transform: scale(1.03); }

.tag { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; background: #fff; font-size: 0.6875rem; font-weight: 600; color: var(--color-primary); }

.card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 10px 8px; }
.label { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-secondary); }
.card-title { margin-top: 8px; font-size: 1.375rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.card-title button { padding: 0; border: 0; background: none; text-align: left; font: inherit; letter-spacing: inherit; transition: color var(--transition); }
.card-title button:hover { color: var(--color-accent); }
.card-text { flex: 1; margin-top: 10px; font-size: 0.875rem; color: var(--color-text-secondary); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 4.1em; }

.card-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 18px; }
.price-label { display: block; font-size: 0.8125rem; color: var(--color-text-secondary); }
.price { display: block; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.card-footer .btn { min-width: 96px; }

.portfolio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.work img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--color-border); }
.work figcaption { display: flex; flex-direction: column; margin-top: 12px; }
.work figcaption span { font-size: 0.875rem; color: var(--color-text-secondary); }

.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 6vw, 80px); align-items: end; }
.about-text { font-size: 1.125rem; color: var(--color-text-secondary); margin-bottom: 24px; }

/* ---------- Footer ---------- */

.footer { background: var(--color-primary); color: #c9d2e4; padding-top: 56px; }
.footer .logo { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr; gap: 32px; }
.footer-text { margin-top: 12px; font-size: 0.875rem; max-width: 22em; }
.footer-title { margin-bottom: 14px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; }
.footer li { margin-bottom: 8px; font-size: 0.875rem; }
.footer a { color: inherit; text-decoration: none; }
.footer a:hover, .footer .link-plain:hover { color: #fff; }
.footer .link-plain { text-align: left; }
.contact-list li { overflow-wrap: anywhere; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 40px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.8125rem; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.legal-links li { margin: 0; font-size: inherit; }

/* ---------- Overlays ---------- */

.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(17, 19, 24, 0.5); }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; flex-direction: column;
  width: min(440px, 100%);
  background: var(--color-surface);
  box-shadow: -8px 0 30px rgba(17, 19, 24, 0.12);
}
.slide { transition: transform 220ms ease; }
.slide-out { transform: translateX(100%); }
.slide-in { transform: translateX(0); }

.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 24px; border-bottom: 1px solid var(--color-border); }
.drawer-head h2 { font-size: 1.25rem; font-weight: 700; }

.drawer-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; flex: 1; padding: 24px; color: var(--color-text-secondary); }

.cart-list { flex: 1; overflow-y: auto; padding: 8px 24px; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--color-border); }
.cart-item img { width: 72px; height: 45px; object-fit: cover; border-radius: 6px; border: 1px solid var(--color-border); }
.cart-info { display: flex; flex-direction: column; gap: 2px; font-size: 0.9375rem; min-width: 0; }
.cart-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; font-size: 0.9375rem; }
.cart-side .link { font-size: 0.8125rem; color: var(--color-danger); }
.muted { font-size: 0.875rem; color: var(--color-text-secondary); }

.qty { display: inline-flex; align-items: center; margin-top: 8px; border: 1px solid var(--color-border); border-radius: 8px; width: max-content; }
.qty button { width: 36px; height: 36px; border: 0; background: none; font-size: 1.125rem; }
.qty button:hover:not(:disabled) { background: var(--color-muted); }
.qty button:disabled { color: #b4b9c4; cursor: not-allowed; }
.qty span { min-width: 28px; text-align: center; font-weight: 600; }

.drawer-foot { padding: 20px 24px 24px; border-top: 1px solid var(--color-border); }
.subtotal { display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 1.0625rem; }
.subtotal strong { font-size: 1.25rem; }

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal-panel { position: relative; width: min(640px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--color-surface); border-radius: 18px; }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; background: #fff; border: 1px solid var(--color-border); }

.detail > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--color-muted); }
.detail-body { display: flex; flex-direction: column; padding: 28px 32px 28px; }
.detail-title { margin-top: 8px; font-size: 1.75rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.detail-text { margin-top: 12px; color: var(--color-text-secondary); font-size: 0.9375rem; }
.includes { margin-top: 18px; display: grid; gap: 8px; font-size: 0.9375rem; }
.includes li { position: relative; padding-left: 24px; }
.includes li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 10px; height: 6px; border-left: 2px solid var(--color-success); border-bottom: 2px solid var(--color-success); transform: rotate(-45deg); }
.detail-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 28px; }

.legal-panel { width: min(680px, 100%); }

.snap-panel { width: min(440px, 100%); }
.snap-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 24px; border-bottom: 1px solid var(--color-border); }
.snap-head h2 { font-size: 1.0625rem; font-weight: 700; }
.snap-banner { padding: 10px 24px; background: #fff7e0; border-bottom: 1px solid #f1e2b0; font-size: 0.8125rem; color: #6b5200; }
.snap-body { padding: 20px 24px 24px; }
.snap-merchant { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--color-border); }
.snap-merchant div { display: flex; flex-direction: column; }
.snap-merchant span { font-size: 0.8125rem; color: var(--color-text-secondary); }
.snap-amount { font-size: 1.375rem; letter-spacing: -0.01em; }
.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.method { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 84px; padding: 12px 6px; border: 1px solid var(--color-border); border-radius: 10px; font-size: 0.75rem; font-weight: 500; text-align: center; color: var(--color-text-secondary); cursor: pointer; transition: border-color var(--transition), color var(--transition), background var(--transition); }
.method:hover { border-color: #b9c0cf; }
.method.is-selected { border-color: var(--color-primary); background: var(--color-muted); color: var(--color-primary); }
.method:focus-within { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.method input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.snap-methods { margin: 0 0 20px; padding: 0; border: 0; }
.snap-methods legend { margin-bottom: 10px; padding: 0; font-size: 0.875rem; font-weight: 600; }
.legal { padding: 36px 32px 32px; }
.legal h2 { padding-right: 40px; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.legal section { margin-top: 20px; }
.legal h3 { font-size: 1rem; font-weight: 700; }
.legal p { margin-top: 6px; font-size: 0.9375rem; color: var(--color-text-secondary); }

/* ---------- Checkout & confirmation ---------- */

.page-head { padding: 24px 0 40px; background: var(--color-hero); }
.back-link { padding: 0; border: 0; background: none; font-size: 0.9375rem; color: var(--color-text-secondary); }
.back-link:hover { color: var(--color-text); }
.page-title { margin-top: 16px; font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -0.03em; }
.page-title:focus { outline: none; }
.notice { margin-top: 12px; max-width: 42em; color: var(--color-text-secondary); }
.notice strong { color: var(--color-text); }

.checkout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: start; padding-top: 40px; padding-bottom: 80px; }
.block-title { margin-bottom: 16px; font-size: 1.125rem; font-weight: 700; }
.optional { font-weight: 400; color: var(--color-text-secondary); font-size: 0.875rem; }

.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.875rem; font-weight: 600; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--color-border); border-radius: 10px; background: #fff;
  transition: border-color var(--transition);
}
.field textarea { resize: vertical; }
.field input:hover, .field textarea:hover { border-color: #b9c0cf; }
.field.has-error input, .field.has-error textarea { border-color: var(--color-danger); }
.error { margin-top: 6px; font-size: 0.8125rem; color: var(--color-danger); }
.error-block { margin-bottom: 14px; }

.radio { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 14px; border: 1px solid var(--color-border); border-radius: 10px; font-weight: 500; transition: border-color var(--transition); cursor: pointer; }
.radio.is-selected { border-color: var(--color-primary); background: var(--color-muted); }
.radio input { accent-color: var(--color-primary); }
.radio small { margin-left: auto; font-size: 0.75rem; color: var(--color-text-secondary); }

.voucher { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--color-border); }
.voucher label { display: block; margin-bottom: 6px; font-size: 0.875rem; font-weight: 600; }
.voucher-row { display: flex; gap: 8px; }
.voucher-row input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 1px solid var(--color-border); border-radius: 10px; background: #fff; text-transform: uppercase; transition: border-color var(--transition); }
.voucher-row input::placeholder { text-transform: none; }
.voucher-row input:hover { border-color: #b9c0cf; }
.voucher-row input.has-error { border-color: var(--color-danger); }

.totals .discount dd { display: inline-flex; align-items: center; gap: 8px; color: var(--color-success); }
.chip-remove { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 1px solid var(--color-border); border-radius: 50%; background: #fff; font-size: 1rem; line-height: 1; color: var(--color-text-secondary); transition: background var(--transition), color var(--transition); }
.chip-remove:hover { background: var(--color-danger); border-color: var(--color-danger); color: #fff; }

.field.checkbox label { display: flex; gap: 10px; font-weight: 400; line-height: 1.5; }
.field.checkbox input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--color-primary); }
.field.checkbox.has-error input { outline: 2px solid var(--color-danger); }

.summary { position: sticky; top: calc(var(--header-height) + 16px); padding: 24px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-muted); }
.summary-list li { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--color-border); font-size: 0.9375rem; }
.summary-list img { width: 72px; height: 45px; object-fit: cover; border-radius: 6px; }
.summary-list div { display: flex; flex-direction: column; min-width: 0; }
.summary-list div span { font-size: 0.8125rem; color: var(--color-text-secondary); }
.line-total { font-weight: 600; }

.totals { margin-top: 12px; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; }
.totals dt { color: var(--color-text-secondary); }
.totals dd { font-weight: 600; }
.totals .grand { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--color-border); font-size: 1.125rem; }
.totals .grand dt { color: var(--color-text); font-weight: 700; }
.totals .grand dd { font-size: 1.25rem; font-weight: 800; }

.success-head { text-align: center; }
.success-head .notice { margin-left: auto; margin-right: auto; }
.success-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--color-success); color: #fff; }
.success-head .page-title { margin-top: 20px; }

.confirmation { padding-top: 40px; padding-bottom: 80px; }
.confirmation .btn { margin-top: 32px; }
.facts { margin-bottom: 32px; border: 1px solid var(--color-border); border-radius: var(--radius); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 20px; }
.facts div + div { border-top: 1px solid var(--color-border); }
.facts dt { color: var(--color-text-secondary); }
.facts dd { font-weight: 600; text-align: right; }

.noscript { padding: 16px; text-align: center; background: var(--color-muted); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .nav-desktop, .btn-header { display: none; }
  .menu-btn { display: inline-grid; }

  .nav-mobile {
    display: flex; flex-direction: column; gap: 4px;
    padding: 8px var(--gutter) 20px;
    background: var(--color-background); border-bottom: 1px solid var(--color-border);
  }
  .nav-mobile[x-cloak] { display: none; }
  .nav-mobile a { padding: 14px 4px; font-size: 1.0625rem; font-weight: 500; color: var(--color-text); text-decoration: none; border-bottom: 1px solid var(--color-border); }
  .nav-mobile .btn { margin-top: 12px; }

  .hero-inner { grid-template-columns: 1fr; min-height: 0; padding-top: 32px; padding-bottom: 0; gap: 8px; }
  .hero-art { justify-self: center; max-width: 640px; }

  .product-grid, .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about { grid-template-columns: 1fr; align-items: start; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .checkout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .summary { position: static; order: -1; }
}

@media (max-width: 560px) {
  :root { --header-height: 64px; }
  .logo { font-size: 1.375rem; }
  .product-grid, .portfolio-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .detail-body, .legal { padding: 24px 20px 20px; }
  .detail-foot { flex-wrap: wrap; }
  .detail-foot .btn { flex: 1; }
  .cart-list, .drawer-foot { padding-left: 16px; padding-right: 16px; }
  .facts div { flex-direction: column; gap: 2px; }
  .facts dd { text-align: left; }
  .btn-back { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

.price, .line-total, .totals dd, .subtotal strong, .cart-side strong, .snap-amount, .btn { white-space: nowrap; }

@media (max-width: 560px) {
  .snap-amount { font-size: 1.125rem; }
  .summary-list li { grid-template-columns: 72px minmax(0, 1fr); }
  .summary-list .line-total { grid-column: 2; }
  .summary-list div span { white-space: nowrap; }
  .snap-body { padding: 18px 16px 20px; }
  .snap-head { padding-left: 16px; }
  .snap-banner { padding-left: 16px; padding-right: 16px; }
}
