/* KASEI OPTICS 前台样式 */
:root {
  --bg: #FCFDFE; --surface: #F4F7FA; --white: #FFFFFF;
  --line: #DCE3EA; --line-soft: #E6EBF0; --line-strong: #C5CFD9;
  --text: #0F1B2A; --text-2: #3F4B59; --muted: #5B6776;
  --accent: #0B5FB0; --accent-dark: #084A8A; --accent-soft: #EAF3FB;
  --radius: 6px;
  --font: "IBM Plex Sans", "Noto Sans JP", sans-serif;
}
.lang-zh { --font: "IBM Plex Sans", "Noto Sans SC", sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { margin: 0; line-height: 1.3; }
p { margin: 0; }
.mono { font-family: "IBM Plex Mono", monospace; }
.wrap { max-width: 1344px; margin: 0 auto; padding: 0 32px; }
.pre { white-space: pre-line; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 28px; border-radius: var(--radius); font-size: 16px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: transform .15s, background-color .2s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: var(--white); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-white { background: #fff; color: var(--accent); font-weight: 600; }
.link-arrow { font-weight: 500; }

/* utility + header */
.utility { background: var(--surface); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.utility-in { height: 36px; display: flex; align-items: center; justify-content: flex-end; gap: 24px; }
.langs { display: flex; gap: 4px; }
.langs a { padding: 3px 10px; border-radius: var(--radius); color: var(--text-2); }
.langs a.on { background: var(--text); color: #fff; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-in { height: 72px; display: flex; align-items: center; gap: 32px; }
.logo { display: flex; align-items: center; gap: 12px; color: var(--text); font-family: "IBM Plex Sans", sans-serif; font-weight: 600; font-size: 18px; letter-spacing: .08em; white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; font-size: 15px; white-space: nowrap; }
.main-nav a { color: var(--text); }
.main-nav a.on { color: var(--accent); font-weight: 500; }
.main-nav a:hover { color: var(--accent); }
.main-nav .nav-cta { height: 44px; padding: 0 20px; font-size: 15px; color: #fff; }
.nav-toggle, .nav-burger { display: none; }

/* 导航下拉：製品カテゴリ */
.nav-drop { position: relative; display: flex; align-items: center; gap: 2px; }
.drop-toggle { background: none; border: 0; padding: 8px 6px; color: var(--text); cursor: pointer; display: flex; align-items: center; border-radius: var(--radius); }
.drop-toggle svg { transition: transform .2s; }
.drop-menu { position: absolute; top: calc(100% + 14px); left: -16px; min-width: 240px; max-height: 60vh; overflow-y: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(15,27,42,.10); padding: 8px; display: none; flex-direction: column; z-index: 30; }
.drop-menu::before { content: ""; position: absolute; top: -16px; left: 0; right: 0; height: 16px; }
.drop-menu a { padding: 10px 12px; border-radius: var(--radius); color: var(--text); white-space: nowrap; }
.drop-menu a:hover { background: var(--surface); color: var(--accent); }
.drop-menu a:first-child { font-weight: 500; border-bottom: 1px solid var(--line-soft); border-radius: var(--radius) var(--radius) 0 0; margin-bottom: 4px; }
@media (hover: hover) and (min-width: 961px) { .nav-drop:hover .drop-menu { display: flex; } }
.nav-drop.open .drop-menu { display: flex; }
.nav-drop.open .drop-toggle svg { transform: rotate(180deg); }

/* 类别下拉筛选 */
.sec-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.cat-select { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cat-select label { font-size: 14px; color: var(--text-2); }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 1.6px solid var(--text-2); border-bottom: 1.6px solid var(--text-2); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.cat-select select { appearance: none; -webkit-appearance: none; font: inherit; font-size: 15px; height: 44px; min-width: 260px; padding: 0 44px 0 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--white); color: var(--text); cursor: pointer; }
.cat-select select:hover { border-color: var(--accent); }
.cat-select .count { font-size: 14px; color: var(--muted); }
.empty { padding: 48px 0 96px; color: var(--muted); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 620px); gap: 64px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.hero h1 { font-size: 50px; line-height: 1.22; font-weight: 700; letter-spacing: -.01em; white-space: pre-line; }
.lang-zh .hero h1 { font-size: 54px; }
.lang-en .hero h1 { font-size: 46px; }
.hero-text { display: flex; flex-direction: column; gap: 28px; }
.hero-text p { font-size: 17px; line-height: 1.85; color: var(--text-2); max-width: 32em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.carousel { position: relative; aspect-ratio: 620 / 528; border-radius: var(--radius); overflow: hidden; background: #0A0F16; }
.carousel .slide { position: absolute; inset: 0 0 64px 0; opacity: 0; transition: opacity .6s ease; }
.carousel .slide.on { opacity: 1; }
.carousel .slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel .arrow { position: absolute; top: calc(50% - 54px); width: 44px; height: 44px; border: 0; border-radius: var(--radius); background: rgba(255,255,255,.92); color: var(--text); font-size: 20px; cursor: pointer; z-index: 2; }
.carousel .arrow.prev { left: 16px; } .carousel .arrow.next { right: 16px; }
.carousel .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: #fff; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 20px; }
.carousel .caption { flex: 1; font-size: 15px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carousel .dots { display: flex; gap: 6px; }
.carousel .dots button { width: 8px; height: 8px; border-radius: 4px; border: 0; padding: 0; background: var(--line-strong); cursor: pointer; transition: width .3s; }
.carousel .dots button.on { width: 24px; background: var(--accent); }

/* gateway bento */
.gateway { display: grid; grid-template-columns: 1.55fr 1fr; grid-template-rows: repeat(2, minmax(168px, 1fr)); gap: 24px; padding-top: 24px; padding-bottom: 96px; }
.tile { border-radius: var(--radius); padding: 28px 32px; display: flex; flex-direction: column; gap: 10px; color: var(--text); border: 1px solid var(--line); background: var(--white); transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .3s, box-shadow .3s; }
.tile:hover, .card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 10px 30px rgba(11,95,176,.10); color: var(--text); }
.tile strong { font-size: 22px; }
.tile span { font-size: 15px; line-height: 1.7; color: var(--text-2); }
.tile .more { margin-top: auto; color: var(--accent); font-weight: 500; }
.tile.soft { background: var(--accent-soft); border-color: #D3E4F4; }
.tile.photo { grid-row: 1 / span 2; position: relative; overflow: hidden; padding: 0; border-color: var(--text); color: #fff; min-height: 360px; }
.tile.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.photo .scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,13,20,.92) 0%, rgba(8,13,20,.55) 45%, rgba(8,13,20,.05) 100%); }
.tile.photo .in { position: absolute; left: 36px; right: 36px; bottom: 32px; display: flex; flex-direction: column; gap: 12px; }
.tile.photo strong { font-size: 30px; }
.tile.photo span { color: #D5DEE8; font-size: 16px; }
.tile.photo .more { color: #fff; }

/* section headings */
.sec { padding-top: 96px; padding-bottom: 96px; }
.sec-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.sec-head h2 { font-size: 36px; font-weight: 700; }
.sec-head p { color: var(--text-2); }
#products.sec { padding-top: 0; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filters a { height: 40px; padding: 0 18px; display: inline-flex; align-items: center; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--white); color: var(--text-2); font-size: 14px; }
.filters a.on { background: var(--text); border-color: var(--text); color: #fff; }

/* product bento */
.product-bento { display: grid; grid-template-columns: 1.3fr 1fr 1fr; grid-auto-rows: minmax(268px, auto); gap: 24px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; display: flex; flex-direction: column; color: var(--text); transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .3s, box-shadow .3s; }
.card img { width: 100%; height: 160px; object-fit: cover; background: #0A0F16; }
.card .body { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .cat { font-size: 13px; color: var(--accent); font-weight: 500; }
.card h3 { font-size: 18px; font-weight: 600; }
.card p { font-size: 14px; line-height: 1.7; color: var(--text-2); }
.card .more { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 500; color: var(--accent); }
.card.feature { grid-row: span 2; }
.card.feature img { height: 300px; }
.card.feature .body { padding: 28px; gap: 14px; }
.card.feature h3 { font-size: 24px; }
.card.feature p { font-size: 15px; }
.card.wide { grid-column: span 2; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.card.wide img { height: 100%; }
.card.wide .body { padding: 24px 28px; }
.spec-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.spec-chips div { background: var(--surface); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.spec-chips small { font-size: 12px; color: var(--muted); }
.spec-chips span { font-family: "IBM Plex Mono", monospace; font-size: 15px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; }
.row-between .price { font-size: 14px; color: var(--text-2); }

/* consulting */
.consult { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.consult-in { display: grid; grid-template-columns: 460px minmax(0, 1fr); gap: 72px; padding-top: 80px; padding-bottom: 80px; }
.consult h2 { font-size: 34px; line-height: 1.35; white-space: pre-line; }
.consult-left { display: flex; flex-direction: column; gap: 18px; }
.consult-left p { line-height: 1.8; color: var(--text-2); }
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; row-gap: 32px; align-content: center; }
.services div { border-top: 2px solid var(--line-strong); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.services div:first-child { border-color: var(--accent); }
.services strong { font-size: 19px; }
.services span { font-size: 15px; line-height: 1.7; color: var(--text-2); }

/* cases */
.cases-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; }
.case-feature img { height: 280px; }
.case-feature .body { padding: 24px 28px; gap: 10px; }
.case-feature h3 { font-size: 23px; line-height: 1.45; }
.case-list { display: flex; flex-direction: column; }
.case-list a.item { border-top: 1px solid var(--line); padding: 26px 0; display: flex; flex-direction: column; gap: 10px; color: var(--text); }
.case-list a.item:hover h3 { color: var(--accent); }
.case-list h3 { font-size: 19px; line-height: 1.45; }
.case-list p { color: var(--text-2); font-size: 15px; }
.case-list .all { margin-top: auto; border-top: 1px solid var(--line); padding-top: 24px; font-weight: 500; }
.tagline { font-size: 13px; color: var(--accent); font-weight: 500; }

/* news */
.news-list { display: flex; flex-direction: column; margin-bottom: 24px; }
.news-list a { min-height: 60px; display: grid; grid-template-columns: 120px 104px minmax(0, 1fr) 24px; gap: 24px; align-items: center; border-bottom: 1px solid var(--line-soft); color: var(--text); font-size: 15px; padding: 10px 0; }
.news-list a:hover span.title { color: var(--accent); }
.news-list .date { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--muted); }
.news-list .tag { font-size: 12px; text-align: center; padding: 3px 0; border-radius: var(--radius); background: var(--surface); color: var(--text-2); }
.news-list .tag.expo, .news-list .tag.product { background: var(--accent-soft); color: var(--accent); }

/* contact band（首页底部的咨询表单） */
.contact-band { padding-bottom: 80px; scroll-margin-top: 90px; }
.contact-box { border-radius: var(--radius); background: var(--accent); padding: 56px; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.contact-intro h2 { font-size: 32px; color: #fff; }
.contact-intro p { font-size: 16px; line-height: 1.7; color: #D6E6F6; margin-top: 14px; }
.contact-intro .tel { font-size: 15px; color: #fff; margin-top: 28px; line-height: 1.8; }
.contact-intro .tel span { color: #D6E6F6; font-family: var(--font); font-size: 13px; }
.contact-card { background: var(--white); border-radius: var(--radius); padding: 32px; }
.contact-card .form { padding-bottom: 0; max-width: none; }
.contact-card textarea { min-height: 140px; }
.contact-card .alert { margin-bottom: 16px; }
.submit-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.submit-row .hint { font-size: 13px; color: var(--muted); }
.sent { display: flex; flex-direction: column; gap: 10px; padding: 24px 8px; }
.sent h3 { font-size: 24px; }

/* footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-top: 56px; }
.footer-in { display: flex; gap: 80px; flex-wrap: wrap; }
.footer-brand { width: 360px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; color: var(--text-2); line-height: 1.8; }
.footer-brand strong { font-family: "IBM Plex Sans", sans-serif; letter-spacing: .08em; color: var(--text); font-size: 16px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.footer-col a { color: var(--text-2); }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* inner pages */
.page-head { padding-top: 56px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 14px; }
.page-head h1 { font-size: 40px; }
.page-head p { color: var(--text-2); font-size: 17px; max-width: 46em; }
.crumb { font-size: 13px; color: var(--muted); }
.crumb a { color: var(--muted); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-bottom: 96px; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 64px; padding-bottom: 96px; }
.detail-main { display: flex; flex-direction: column; gap: 40px; }
.detail-main h2 { font-size: 24px; margin-bottom: 12px; }
.detail-main p { font-size: 17px; line-height: 1.9; color: #2A3440; margin-bottom: 12px; }
.detail-hero-img { border-radius: var(--radius); overflow: hidden; background: #0A0F16; }
.detail-hero-img img { width: 100%; max-height: 480px; object-fit: cover; }
.aside-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; background: var(--white); }
.aside-box.accent { border-color: var(--accent); background: var(--accent-soft); }
.aside-box h3 { font-size: 16px; }
.aside-stack { display: flex; flex-direction: column; gap: 24px; }
.meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.meta-grid div { padding: 18px 22px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); }
.meta-grid div:last-child { border-right: 0; }
.meta-grid small { font-size: 12px; color: var(--muted); }
.spec-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec-table div { display: grid; grid-template-columns: 200px minmax(0, 1fr); padding: 14px 18px; gap: 16px; border-top: 1px solid var(--line-soft); }
.spec-table div:first-child { border-top: 0; }
.spec-table small { color: var(--muted); font-size: 14px; }
.spec-table span { font-family: "IBM Plex Mono", monospace; }
.mini-item { display: flex; gap: 14px; align-items: center; color: var(--text); }
.mini-item img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }

/* forms */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 880px; padding-bottom: 96px; }
.form .full { grid-column: 1 / -1; }
.form label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 500; }
.form label em { font-style: normal; font-size: 12px; color: var(--accent); margin-left: 6px; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--white); color: var(--text); }
.form textarea { min-height: 180px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form .hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.form .hp { position: absolute; left: -9999px; }
.alert { padding: 14px 18px; border-radius: var(--radius); background: #FDECEC; color: #8F1D14; margin-bottom: 20px; max-width: 880px; }
.success { padding: 40px; border-radius: var(--radius); background: var(--accent-soft); max-width: 880px; margin-bottom: 96px; display: flex; flex-direction: column; gap: 12px; }
.success h2 { font-size: 26px; }

.table { width: 100%; border-collapse: collapse; margin-bottom: 96px; font-size: 15px; }
.table th, .table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.table th { background: var(--surface); font-weight: 600; font-size: 14px; color: var(--text-2); }
.prose { max-width: 46em; padding-bottom: 96px; }
.prose p { font-size: 17px; line-height: 1.9; margin-bottom: 16px; }

/* responsive */
@media (max-width: 960px) {
  .nav-burger { display: flex; flex-direction: column; gap: 5px; margin-left: auto; cursor: pointer; padding: 10px; }
  .nav-burger span { width: 22px; height: 2px; background: var(--text); }
  .main-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 32px 20px; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .main-nav .nav-cta { margin-top: 12px; border-bottom: 0; }
  .nav-toggle:checked ~ .main-nav { display: flex; }
  .nav-drop { flex-wrap: wrap; border-bottom: 1px solid var(--line-soft); }
  .nav-drop > a { flex: 1; border-bottom: 0; }
  .drop-menu { position: static; box-shadow: none; border: 0; padding: 0 0 8px 12px; min-width: 0; width: 100%; max-height: none; }
  .drop-menu::before { display: none; }
  .drop-menu a { border-bottom: 0; padding: 8px 0; }
  .drop-menu a:first-child { border-bottom: 0; margin: 0; }
}
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .consult-in { grid-template-columns: 1fr; gap: 40px; }
  .cases-grid, .detail { grid-template-columns: 1fr; }
  .product-bento { grid-template-columns: 1fr 1fr; }
  .card.feature { grid-row: auto; grid-column: span 2; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .contact-box { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .wrap { padding: 0 16px; }
  .hide-sm { display: none; }
  .hero { padding-top: 32px; padding-bottom: 32px; }
  .hero h1, .lang-zh .hero h1, .lang-en .hero h1 { font-size: 34px; }
  .gateway { grid-template-columns: 1fr; grid-template-rows: none; padding-bottom: 56px; }
  .tile.photo { grid-row: auto; min-height: 320px; }
  .sec { padding-top: 56px; padding-bottom: 56px; }
  .sec-head h2, .consult h2 { font-size: 26px; }
  .product-bento, .grid-3 { grid-template-columns: 1fr; }
  .card.feature, .card.wide { grid-column: auto; }
  .card.wide { grid-template-columns: 1fr; }
  .card.wide img { height: 180px; }
  .services { grid-template-columns: 1fr; }
  .news-list a { grid-template-columns: 1fr; gap: 6px; }
  .news-list .tag { justify-self: start; padding: 3px 10px; }
  .news-list a > span:last-child { display: none; }
  .contact-box { padding: 28px 16px; }
  .contact-intro h2 { font-size: 24px; }
  .contact-card { padding: 20px 16px; }
  .footer-in { gap: 32px; }
  .footer-brand { width: 100%; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .meta-grid div:nth-child(2) { border-right: 0; }
  .form { grid-template-columns: 1fr; }
  .spec-table div { grid-template-columns: 1fr; gap: 4px; }
  .page-head h1 { font-size: 30px; }
  .cat-select, .cat-select .select-wrap, .cat-select select { width: 100%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .tile:hover, .card:hover { transform: none; }
}
