@layer base, layout, components, responsive;

@layer base {
  :root {
    --ink: #221c19;
    --muted: #635851;
    --orange: #c23b06;
    --orange-deep: #a52e01;
    --warm: #fff4eb;
    --paper: #fffbf8;
    --line: #ece0d8;
    --font: "Inter", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", system-ui, sans-serif;
    color: var(--ink);
    font-family: var(--font);
    font-synthesis: none;
    line-height: 1.65;
  }
  *, *::before, *::after { box-sizing: border-box; }
  body { margin: 0; background: #fff; }
  h1, h2, h3, p, ul, dl, dd { margin: 0; }
  h1, h2, h3 { font-weight: 800; line-height: 1.27; }
  h2 { font-size: clamp(1.7rem, 3.4vw, 2.65rem); letter-spacing: -.045em; }
  h3 { font-size: 1.12rem; }
  p { color: var(--muted); }
  a { color: inherit; text-decoration: none; }
  img { display: block; max-width: 100%; }
  svg { display: block; width: 1.25em; height: 1.25em; flex: none; }
  button, input { font: inherit; }
  button { color: inherit; }
  [hidden] { display: none !important; }
  :focus-visible { outline: 3px solid #b43300; outline-offset: 4px; }
  section[id], .support-channel[id] { scroll-margin-top: 1.2rem; }
  .skip, .sr-only { position: absolute; height: 1px; width: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .skip:focus { clip-path: none; width: auto; height: auto; padding: .7rem; background: white; z-index: 5; }
}

@layer layout {
  .container { width: min(100% - 7rem, 76rem); margin-inline: auto; }
  .section { padding-block: clamp(3rem, 6.8vw, 6.25rem); }
  .section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2rem; }
  .section-heading p, .lead { margin-top: .65rem; }
  .actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
  .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 7vw, 7rem); align-items: center; }
  .split__copy > p:not(.eyebrow) { margin-block: 1rem 1.55rem; max-width: 34rem; }
  .product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; align-items: stretch; }
  .faq-grid, .contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.125rem; }
}

@layer components {
  .header { position: relative; z-index: 2; background: #fff; border-bottom: 1px solid #f3ebe5; }
  .header__inner { display: grid; grid-template-columns: 1fr auto 1fr; min-height: 74px; align-items: center; }
  .brand { display: inline-flex; width: fit-content; }
  .brand__logo { width: clamp(8.3rem, 15vw, 10.6rem); height: auto; }
  .wordmark { font-family: "Arial Black", Arial, sans-serif; font-size: 2rem; font-weight: 900; font-style: italic; line-height: 1; letter-spacing: -.105em; padding-right: .12em; white-space: nowrap; }
  .wordmark b { color: var(--orange); letter-spacing: -.12em; margin-right: .045em; }
  .wordmark > span { color: var(--orange); margin-left: .06em; }
  .nav { display: flex; gap: clamp(1.2rem, 3.25vw, 3rem); }
  .nav a, .language { font-size: .875rem; font-weight: 700; }
  .nav a { display: grid; align-items: center; min-height: 74px; position: relative; }
  .nav a:hover, .nav a[aria-current] { color: var(--orange); }
  .nav a[aria-current]::after { content: ""; position: absolute; bottom: 0; width: 100%; height: 3px; background: var(--orange); }
  .language { justify-self: end; display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--line); padding: .49rem .7rem; border-radius: .55rem; }
  .language:hover { border-color: var(--orange); color: var(--orange); }
  .menu-toggle { display: none; cursor: pointer; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: .55rem; width: 42px; height: 42px; }

  .hero { background: linear-gradient(90deg, #fff4e9, #f9f4ee 58%, #ffe0c6); overflow: hidden; }
  .hero__inner { min-height: clamp(29rem, 39vw, 35rem); display: flex; align-items: center; position: relative; isolation: isolate; }
  .hero__image { position: absolute; top: 0; bottom: 0; right: -2rem; width: min(78vw, 52rem); z-index: -1; }
  .hero__image img { width: 100%; height: 100%; object-fit: cover; object-position: center 50%; }
  .hero__image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #fcf4ec 0%, #fcf4ecd9 16%, transparent 40%, transparent 92%, #ffe0c6); }
  .hero__copy { max-width: 33rem; padding-block: 3rem; }
  .eyebrow { color: var(--orange-deep); font-size: .875rem; font-weight: 800; letter-spacing: .07em; margin-bottom: .8rem; }
  .hero h1 { font-size: clamp(2.35rem, 4.2vw, 3.85rem); line-height: 1.18; letter-spacing: -.07em; }
  [lang=en] .hero h1 { letter-spacing: -.065em; line-height: 1.02; }
  .hero__description { margin-block: 1.3rem 1.8rem; max-width: 29rem; }
  .button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; border-radius: .6rem; padding: .68rem 1.2rem; border: 1px solid transparent; font-size: .875rem; line-height: 1.4; font-weight: 800; text-align: center; transition: background-color .16s, border-color .16s, color .16s; }
  .button--primary { background: var(--orange); color: #fff; }
  .button--primary:hover { background: var(--orange-deep); }
  .button--outline, .button--light { background: #fff; border-color: var(--line); }
  .button--outline:hover, .button--light:hover { background: var(--warm); border-color: var(--orange); color: var(--orange-deep); }
  .button--line { background: #087a38; color: white; }
  .button--line:hover { background: #055c29; }

  .categories { border-bottom: 1px solid var(--line); }
  .category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .category { display: flex; align-items: center; gap: .8rem; min-height: 105px; padding: .7rem 1rem; border-right: 1px solid var(--line); }
  .category:first-child { padding-left: 0; }
  .category:last-child { border-right: 0; }
  .category:hover strong { color: var(--orange); }
  .category strong, .category small { display: block; }
  .category strong { font-size: .93rem; line-height: 1.45; }
  .category small, .contact-link small { color: var(--muted); font-size: .8125rem; line-height: 1.5; margin-top: .2rem; }
  .feature-icon { display: inline-grid; flex: none; place-items: center; width: 2.75rem; height: 2.75rem; background: var(--warm); color: var(--orange-deep); border-radius: .75rem; }
  .feature-icon svg { width: 1.35rem; height: 1.35rem; }

  .collection { padding-top: clamp(2.7rem, 5.3vw, 4.75rem); }
  .product-card, .video-card, .contact-link { border: 1px solid var(--line); border-radius: .95rem; overflow: hidden; background: white; transition: border-color .16s, box-shadow .16s; }
  .product-card:hover, .video-card:hover, .contact-link:hover { border-color: #db9a7b; box-shadow: 0 4px 20px #7c2a0710; }
  .product-card { display: flex; flex-direction: column; }
  .product-card__media { display: block; position: relative; aspect-ratio: 1.28; background: #faf8f6; border-bottom: 1px solid var(--line); }
  .product-card__media img { position: absolute; inset: 0; padding: var(--product-image-pad, .875rem); width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
  .product-card__body { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
  .product-card__body p { margin-top: .3rem; font-size: .875rem; }
  .product-card__meta { font-size: .8125rem; color: var(--muted); margin-bottom: .32rem; }
  .product-card__end { padding-top: .9rem; margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: .3rem .75rem; flex-wrap: wrap; }
  .price { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
  .text-link { color: var(--orange-deep); font-size: .875rem; font-weight: 750; }
  .text-link:hover, a:hover > .text-link { text-decoration: underline; text-underline-offset: .22em; }
  .lens-feature { background: var(--paper); }
  .lens-feature__media { background: #f5ebe3; border-radius: 1rem; isolation: isolate; overflow: hidden; aspect-ratio: 1.55; }
  .lens-feature__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; mix-blend-mode: multiply; }

  .video-card { display: flex; flex-direction: column; }
  .video-card__media { aspect-ratio: 1.42; position: relative; background: #f6f1ed; overflow: hidden; }
  .video-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
  .video-card__media--thumbnail { aspect-ratio: 16/9; background: #221c19; }
  .video-card__media--thumbnail img { object-fit: cover; mix-blend-mode: normal; }
  .play-badge { display: grid; place-items: center; position: absolute; left: 1.1rem; bottom: 1.1rem; width: 3rem; height: 3rem; border-radius: 50%; background: var(--orange); color: white; box-shadow: 0 2px 14px #6e2a1f44; }
  .play-badge svg { width: 1.35rem; height: 1.35rem; }
  .video-card__body { display: flex; flex: 1; flex-direction: column; gap: .5rem; padding: 1.1rem; }
  .video-card__body p { font-size: .9rem; }
  .video-card__body .text-link { margin-top: auto; }
  .video-card:hover .text-link { text-decoration: underline; text-underline-offset: .22em; }
  .install-feature .video-card__media { aspect-ratio: 1.7; background: #edf0fa; }
  .install-feature .video-card__media img { width: 100%; object-fit: cover; object-position: 50% 62%; }
  .faq-feature { background: var(--paper); }
  .video-dialog { width: min(56rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); border: 0; border-radius: 1rem; padding: 0; color: var(--ink); box-shadow: 0 20px 80px #221c1960; }
  .video-dialog::backdrop { background: #20150ed9; }
  html:has(.video-dialog[open]) { overflow: hidden; }
  .video-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .875rem .7rem 1.15rem; }
  .video-dialog__head h2 { font-size: clamp(1rem, 2.8vw, 1.4rem); letter-spacing: -.02em; }
  .video-dialog__close { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: .55rem; background: white; cursor: pointer; }
  .video-dialog__close:hover { background: var(--warm); }
  .video-dialog__frame { background: #171311; aspect-ratio: 16/9; min-height: 200px; position: relative; }
  .video-dialog__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
  .video-dialog__foot { padding: .8rem 1.15rem; text-align: right; }

  .warranty-banner { background: #b93605; color: white; }
  .warranty-banner__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; }
  .warranty-banner p { color: #ffede3; }
  .warranty-banner .button { color: var(--ink); margin-top: 1.15rem; }
  .warranty-banner h2 + p { margin-top: .7rem; }
  .warranty-banner__terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .warranty-banner__terms > div { display: grid; text-align: center; border-left: 1px solid #ffffff5c; padding: .7rem .5rem; }
  .warranty-banner__terms strong { font-weight: 800; font-size: clamp(2.7rem, 5vw, 4.7rem); letter-spacing: -.08em; line-height: 1; }
  .warranty-banner__terms small { font-size: 1.05rem; letter-spacing: normal; margin-left: .24em; }
  .warranty-banner__terms span { margin-top: .6rem; }
  .contact-link { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: 1.1rem; }
  .contact-link small { display: block; overflow-wrap: anywhere; }
  .contact-link > svg { color: var(--orange-deep); }

  .footer { background: #251c18; color: #fffaf6; }
  .footer .wordmark b, .footer .wordmark > span { color: #ff9a6d; }
  .footer__main { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-block: 2.6rem; align-items: flex-start; }
  .footer__main p { color: #e4d5cd; font-size: .875rem; margin-top: .6rem; }
  .footer__links { display: grid; justify-items: start; gap: .45rem; }
  .footer__links a { font-size: .875rem; color: #e4d5cd; }
  .footer__links strong { margin-bottom: .2rem; }
  .footer a:hover { color: #ff9a6d; }
  .footer__bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #51423a; padding-block: .9rem; color: #e4d5cd; }
  .footer__bottom a { font-size: .875rem; }
  .footer :focus-visible, .warranty-banner :focus-visible { outline-color: #ffbc9b; }

  .page-intro { background: var(--warm); padding-block: 2.2rem 3.4rem; }
  .page-intro h1, .detail h1 { font-size: clamp(2.15rem, 4.6vw, 3.8rem); letter-spacing: -.065em; margin-bottom: .75rem; }
  .page-intro p { max-width: 46rem; }
  .breadcrumb { margin-bottom: 1rem; color: var(--muted); font-size: .875rem; }
  .breadcrumb ol { display: flex; flex-wrap: wrap; gap: .25rem 0; list-style: none; padding: 0; margin: 0; }
  .breadcrumb li + li::before { content: "/"; color: var(--muted); margin-inline: .55rem; }
  .breadcrumb a { color: var(--orange-deep); font-weight: 700; }
  .breadcrumb a:hover { text-decoration: underline; }
  .catalog { padding-top: 2.5rem; }
  .filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .85rem; }
  .filters__tabs, .jump-links { display: flex; flex-wrap: wrap; gap: .5rem; }
  .filters__tabs a, .jump-links a { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--line); font-size: .875rem; font-weight: 700; background: #fff; border-radius: .65rem; min-height: 44px; padding: .55rem .75rem; }
  .filters__tabs a[aria-current] { background: var(--orange); color: white; border-color: var(--orange); }
  .filters__tabs a:hover, .jump-links a:hover { border-color: var(--orange); }
  .catalog__count { font-size: .875rem; color: var(--muted); margin-block: 1.2rem .65rem; }
  .search { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: .65rem; padding-inline: .75rem; }
  .search:focus-within { outline: 2px solid var(--orange); }
  .search input { min-width: 0; width: min(100%, 14rem); height: 44px; border: 0; outline: none; }
  .empty { border: 1px solid var(--line); border-radius: .65rem; padding: 1.25rem; }
  .jump-links { margin-top: 1.3rem; }
  .guide-group { padding-block: clamp(2.1rem, 5vw, 4.2rem); }
  .guide-group + .guide-group { border-top: 1px solid var(--line); }
  .guide-group h2, .support-warranty h2, .related, .product-features h2 { margin-bottom: 1.35rem; }
  .video-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
  .guide-group .lead { margin: -.65rem 0 1.3rem; }
  .assist { background: var(--warm); padding-block: 2.5rem; }
  .assist .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
  .support-warranty { background: var(--paper); }
  .warranty-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .warranty-card, .support-channel, .claim-panel { background: white; border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1.1rem, 2.6vw, 2rem); }
  .warranty-card h3, .support-channel h3 { margin-block: .75rem .5rem; font-size: 1.25rem; }
  .warranty-card p + p { margin-top: .75rem; }
  .claim-panel ul, .product-features ul { margin-top: .65rem; padding-left: 1.35rem; }
  .support-contacts { display: grid; grid-template-columns: 1.9fr 1fr 1fr; gap: 1rem; }
  .support-channel--line { display: grid; grid-template-columns: minmax(0,1fr) minmax(6rem,10rem); gap: .85rem; align-items: center; }
  .support-channel p { margin-top: .55rem; }
  .support-channel .button { margin-top: 1rem; }
  .support-channel__detail { overflow-wrap: anywhere; }
  .line-id { color: #086333; display: inline-block; font-size: 1.27rem; }
  .support-channel__qr { text-align: center; margin: 0; }
  .support-channel__qr img { height: auto; border: 1px solid var(--line); border-radius: .65rem; }
  .support-channel__qr figcaption { margin-top: .4rem; color: var(--muted); font-size: .8125rem; }
  .guide-group .section-heading h2 { margin-bottom: 0; }
  .claim-panel { margin-top: 1rem; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.15rem; }
  .help-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }

  .detail { padding-top: 2rem; }
  .detail__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 7vw, 6rem); align-items: start; }
  .gallery__main { background: #faf8f6; border: 1px solid var(--line); border-radius: 1rem; aspect-ratio: 1.1; display: grid; place-items: center; padding: 1rem; }
  .gallery__main img { width: 100%; height: 100%; min-height: 0; object-fit: contain; mix-blend-mode: multiply; }
  .gallery__thumbs { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .8rem; }
  .gallery__thumbs button { width: 60px; height: 60px; display: grid; place-items: center; padding: .2rem; background: white; border: 1px solid var(--line); border-radius: .45rem; cursor: pointer; }
  .gallery__thumbs button[aria-pressed=true] { border: 2px solid var(--orange); }
  .gallery__thumbs img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
  .tags { display: flex; flex-wrap: wrap; gap: .4rem; }
  .tag { display: inline-block; border-radius: .35rem; background: var(--warm); color: var(--orange-deep); font-size: .875rem; font-weight: 700; padding: .18rem .5rem; }
  .detail__price { font-size: 2rem; margin-top: 1rem; }
  .price-note { font-size: .875rem; margin: .25rem 0 1.1rem; }
  .specs { margin-top: 1.2rem; }
  .specs div { display: grid; grid-template-columns: minmax(5.5rem, auto) 1fr; gap: .75rem; padding-block: .6rem; border-bottom: 1px solid var(--line); font-size: .875rem; }
  .specs dt { font-weight: 700; }
  .specs dd { color: var(--muted); overflow-wrap: anywhere; }
  .product-features { background: var(--paper); }
  .product-features li { margin-bottom: .45rem; }
  .product-features p, .product-features .button { margin-top: .9rem; }
  .related { display: grid; gap: .5rem; margin-top: .8rem; }
  .related a { display: flex; justify-content: space-between; align-items: center; gap: .75rem; border-bottom: 1px solid var(--line); padding-block: .7rem; }
  .related a:hover { color: var(--orange); }
}

@layer responsive {
  @media (max-width: 1050px) {
    .container { width: min(100% - 4rem, 76rem); }
    .hero__image { right: -2rem; }
    .category { gap: .5rem; padding-inline: .6rem; }
    .product-grid { gap: .85rem; }
    .support-contacts { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .support-channel--line { grid-column: 1/-1; }
  }
  @media (max-width: 850px) {
    .container { width: min(100% - 2.5rem, 76rem); }
    .hero__image { right: -1.25rem; }
    .hero__image img { object-position: 62% center; }
    .hero__image::after { background: linear-gradient(90deg, #fff4e9 0%, #fff4e9d6 22%, transparent 62%); }
    .hero__copy { max-width: 24rem; }
    .category-grid, .product-grid, .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category { border-bottom: 1px solid var(--line); min-height: 80px; }
    .category:nth-child(2) { border-right: 0; }
    .category:nth-child(3), .category:nth-child(4) { border-bottom: 0; }
    .category:nth-child(3) { padding-left: 0; }
    .header__inner { grid-template-columns: 1fr auto auto; min-height: 65px; gap: .55rem; }
    .nav { display: none; }
    .nav.is-open, .header__inner:has(.menu-toggle[hidden]) .nav { display: grid; grid-column: 1/-1; grid-row: 2; gap: 0; padding-bottom: .6rem; }
    .nav a { min-height: 48px; border-top: 1px solid var(--line); }
    .nav a[aria-current]::after { display: none; }
    .menu-toggle { display: inline-flex; }
    .contact-grid { grid-template-columns: 1fr; }
  }
  @media (max-width: 600px) {
    .hero__inner { min-height: 0; display: flex; flex-direction: column; align-items: stretch; }
    .hero__image { position: relative; order: 2; inset: auto; margin-inline: -1.25rem; width: auto; aspect-ratio: 1.56; overflow: hidden; }
    .hero__image img { width: auto; height: 106%; max-width: none; position: absolute; top: -3%; right: 8%; object-fit: contain; mask-image: linear-gradient(90deg, transparent, #000 15%, #000 93%, transparent); }
    .hero__image::after { background: linear-gradient(180deg, #fff4e9 0%, transparent 40%); }
    .hero__copy { padding-block: 2.4rem .5rem; }
    .hero__description { margin-block: .85rem 1.1rem; }
    .section-heading { align-items: flex-start; flex-direction: column; margin-bottom: 1.2rem; }
    .split, .warranty-banner__inner, .faq-grid, .detail__grid, .warranty-grid, .support-contacts { grid-template-columns: 1fr; }
    .lens-feature__media { order: 2; }
    .warranty-banner__terms > div:first-child { border-left: 0; }
    .category { flex-direction: column; align-items: flex-start; min-height: 0; padding-block: .85rem; }
    .category strong { font-size: .875rem; }
    .category .feature-icon { width: 1.95rem; height: 1.95rem; }
    .product-card__media { --product-image-pad: .35rem; }
    .product-card__body, .video-card__body { padding: .7rem; }
    .product-card h3, .video-card h3 { font-size: .975rem; }
    .footer__main { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.35rem; }
    .footer__main > div { grid-column: 1/-1; }
    .support-channel--line { grid-template-columns: minmax(0,1fr) minmax(6rem,7.5rem); }
    .assist .container { flex-wrap: wrap; }
  }
  @media (max-width: 365px) {
    .container { width: calc(100% - 1.5rem); }
    .hero h1 { font-size: 2.05rem; }
    .hero__image { margin-inline: -.75rem; }
    .category { gap: .3rem; }
    .product-grid, .video-grid { gap: .55rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
  }
}
