/* ==========================================================================
   KTI Co., Ltd — corporate site stylesheet (2026 redesign)
   One shared stylesheet for all pages / all languages.
   ========================================================================== */

:root {
  --bg:        #faf8f5;
  --surface:   #ffffff;
  --ink:       #26221e;
  --ink-soft:  #5c554e;
  --brand:     #8a3d2c;   /* KTI brown */
  --brand-dark:#6c2f21;
  --gold:      #d9a521;
  --line:      #e8e1d9;
  --dark:      #1f1b18;
  --dark-soft: #2b2622;
  --radius:    14px;
  --shadow:    0 2px 10px rgba(40, 30, 20, .07);
  --shadow-lg: 0 14px 40px rgba(40, 30, 20, .16);
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium",
          "Noto Sans JP", "PingFang SC", "Microsoft YaHei", system-ui,
          -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px;
}

.container { width: min(1120px, 92%); margin-inline: auto; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; gap: 1.6rem;
  min-height: 80px;
}

.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none !important; }
.brand img { height: 50px; width: auto; }
.brand-text {
  display: flex; flex-direction: column; line-height: 1.3;
  padding-left: .85rem; border-left: 2px solid var(--line);
}
.brand-text strong { color: var(--brand); font-size: .95rem; letter-spacing: .04em; }
.brand-text small  { color: var(--ink-soft); font-size: .72rem; letter-spacing: .14em; }

.site-nav { display: flex; gap: 1.5rem; margin-left: auto; }
.site-nav a {
  color: var(--ink); font-weight: 600; font-size: .95rem;
  padding: .35rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--brand); text-decoration: none; }
.site-nav a.active { color: var(--brand); border-bottom-color: var(--gold); }

/* language dropdown */
.lang-switch { position: relative; }
.lang-btn {
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: .38rem 1rem; cursor: pointer; display: flex; align-items: center; gap: .4rem;
}
.lang-btn::after { content: "▾"; font-size: .7em; color: var(--ink-soft); }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 130px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-lg); list-style: none; padding: .4rem; display: none; z-index: 50;
}
.lang-switch.open .lang-list { display: block; }
.lang-list a {
  display: block; padding: .45rem .8rem; border-radius: 7px;
  color: var(--ink); font-size: .9rem;
}
.lang-list a:hover { background: var(--bg); text-decoration: none; }
.lang-list a.current { color: var(--brand); font-weight: 700; }

/* staff login button */
.login-open {
  font: inherit; font-size: .85rem; font-weight: 700;
  color: #fff; background: var(--brand);
  border: 1.5px solid var(--brand); border-radius: 999px;
  padding: .38rem 1.2rem; cursor: pointer; white-space: nowrap;
  transition: .2s;
}
.login-open:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

/* login modal */
.auth-modal {
  position: fixed; inset: 0; z-index: 320;
  background: rgba(12, 9, 7, .72);
  display: flex; align-items: center; justify-content: center; padding: 4vh 4vw;
}
.auth-modal[hidden] { display: none; }
.auth-box {
  position: relative; width: min(400px, 100%);
  background: var(--surface); border-radius: 18px;
  padding: 2.2rem 2rem 2rem; box-shadow: var(--shadow-lg);
}
.auth-box h3 { color: var(--brand-dark); font-size: 1.15rem; margin-bottom: .3rem; }
.auth-box .auth-sub { color: var(--ink-soft); font-size: .85rem; margin-bottom: 1.2rem; }
.auth-box .modal-close {
  position: absolute; top: .9rem; right: 1rem; color: var(--ink-soft); font-size: 1.4rem;
  background: none; border: 0; cursor: pointer; line-height: 1;
}
.auth-field { margin-bottom: 1rem; }
.auth-field label { display: block; font-size: .82rem; font-weight: 700; color: var(--ink-soft); margin-bottom: .3rem; }
.auth-field input {
  width: 100%; font: inherit; padding: .6rem .9rem;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg);
}
.auth-field input:focus { outline: none; border-color: var(--brand); background: #fff; }
.auth-error { color: #c9372c; font-size: .85rem; margin-bottom: .8rem; }
.auth-box .btn { width: 100%; }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 0; cursor: pointer; padding: .4rem;
}
.nav-toggle span {
  display: block; width: 24px; height: 2.5px; background: var(--ink);
  border-radius: 2px; margin: 5px 0; transition: .25s;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--dark);
  color: #fff;
  min-height: 72vh;
  display: flex; align-items: center;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .55;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(20, 14, 10, .82) 25%, rgba(20, 14, 10, .25) 70%);
}
.hero-content { position: relative; z-index: 2; padding: 5.5rem 0; }
.hero-kicker {
  display: inline-block; font-size: .82rem; letter-spacing: .28em;
  color: var(--gold); font-weight: 700; text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.hero h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.9rem);
  line-height: 1.35; font-weight: 800; max-width: 21em;
}
.hero-slogan {
  margin-top: 1.2rem; font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  color: var(--gold); font-weight: 800; letter-spacing: .06em;
}
.hero-sub { margin-top: 1rem; color: #e8e2da; max-width: 44em; font-size: .98rem; }
.hero-actions { margin-top: 2.2rem; display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: .78rem 1.9rem; border-radius: 999px;
  font-weight: 700; font-size: .95rem; transition: .2s;
  text-decoration: none !important; cursor: pointer; border: 0; font-family: inherit;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-outline { border: 1.5px solid var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }

/* page hero (sub pages) */
.page-hero {
  background: linear-gradient(120deg, var(--dark) 30%, #4a2c20 100%);
  color: #fff; padding: 4rem 0 3.2rem;
}
.page-hero h1 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); font-weight: 800; }
.page-hero p { color: #d9d0c5; margin-top: .6rem; max-width: 52em; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: 4.5rem 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }

.section-head { margin-bottom: 2.4rem; }
.section-head .eyebrow {
  color: var(--brand); font-size: .8rem; font-weight: 800;
  letter-spacing: .22em; text-transform: uppercase;
}
.section-head h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); margin-top: .3rem; }
.section-head p { color: var(--ink-soft); margin-top: .5rem; max-width: 56em; }

.prose p + p { margin-top: 1em; }
.prose .em { color: var(--brand); font-weight: 800; }

/* cards */
.card-grid { display: grid; gap: 1.4rem; }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.6rem; transition: .22s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card h3 { font-size: 1.05rem; margin-bottom: .5rem; color: var(--brand-dark); }
.card p { color: var(--ink-soft); font-size: .93rem; }

/* stats strip */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  text-align: center;
}
.stat b { display: block; font-size: 2rem; color: var(--brand); line-height: 1.2; }
.stat span { color: var(--ink-soft); font-size: .86rem; }

/* --------------------------------------------------------------------------
   Product blocks
   -------------------------------------------------------------------------- */
.product-section { padding: 3.6rem 0; }
.product-section + .product-section { border-top: 1px solid var(--line); }

.product-banner {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); margin-bottom: 2rem;
  border: 1px solid var(--line); background: var(--surface);
}

.product-item {
  display: grid; grid-template-columns: 300px 1fr; gap: 1.6rem;
  align-items: start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow);
}
.product-item + .product-item { margin-top: 1.3rem; }
.product-media { position: relative; border-radius: 10px; overflow: hidden; }
.product-media img { width: 100%; }

.play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 8, 6, .28); border: 0; cursor: pointer; transition: .2s; width: 100%;
}
.play-badge:hover { background: rgba(10, 8, 6, .45); }
.play-badge::before {
  content: ""; width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255,255,255,.92) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238a3d2c'%3E%3Cpath d='M8 5.5v13l11-6.5z'/%3E%3C/svg%3E") center/26px no-repeat;
  box-shadow: 0 4px 18px rgba(0,0,0,.35); transition: .2s;
}
.play-badge:hover::before { transform: scale(1.08); }

.product-copy h3 { color: var(--brand-dark); font-size: 1.02rem; margin-bottom: .45rem; }
.product-copy p { color: var(--ink-soft); font-size: .93rem; }
.product-copy .watch {
  display: inline-block; margin-top: .7rem; font-weight: 700; font-size: .88rem;
}

/* feature list */
.feature-list { list-style: none; display: grid; gap: .7rem; }
.feature-list li {
  padding: .75rem 1rem .75rem 2.4rem; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  font-size: .94rem;
}
.feature-list li::before {
  content: "✓"; position: absolute; left: .9rem; color: var(--gold); font-weight: 800;
}

/* spec table */
.spec-table { width: 100%; border-collapse: collapse; background: var(--surface);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  font-size: .93rem; }
.spec-table caption {
  caption-side: top; text-align: left; font-weight: 800; font-size: 1.02rem;
  padding-bottom: .9rem; color: var(--brand-dark);
}
.spec-table th, .spec-table td { padding: .68rem 1rem; border-bottom: 1px solid var(--line); text-align: left; }
.spec-table thead th { background: var(--dark); color: #fff; font-size: .88rem; letter-spacing: .06em; }
.spec-table tbody th { width: 32%; color: var(--ink-soft); font-weight: 600; background: #f6f2ec; }
.spec-table tbody tr:last-child th, .spec-table tbody tr:last-child td { border-bottom: 0; }

.table-scroll { overflow-x: auto; }

/* --------------------------------------------------------------------------
   About page
   -------------------------------------------------------------------------- */
.ceo-card {
  display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow);
}
.ceo-card img { border-radius: 12px; }
.ceo-card ul { list-style: none; display: grid; gap: .5rem; color: var(--ink-soft); font-size: .94rem; }
.ceo-card ul li { padding-left: 1.3rem; position: relative; }
.ceo-card ul li::before { content: "◆"; position: absolute; left: 0; font-size: .6rem; top: .55em; color: var(--gold); }
.ceo-card .ceo-name { font-size: 1.15rem; font-weight: 800; color: var(--brand-dark); }
.ceo-card .ceo-title { color: var(--ink-soft); font-size: .9rem; margin-bottom: 1rem; }

.philosophy {
  text-align: center; background: var(--dark); color: #fff;
  border-radius: var(--radius); padding: 2.6rem 1.6rem;
}
.philosophy .eyebrow { color: var(--gold); letter-spacing: .24em; font-size: .78rem; font-weight: 800; }
.philosophy p { font-size: clamp(1.05rem, 2.2vw, 1.35rem); font-weight: 700; margin-top: .8rem; }

/* timeline */
.timeline { list-style: none; position: relative; padding-left: 1.6rem; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.timeline li { position: relative; padding: 0 0 1.7rem 1.4rem; }
.timeline li::before {
  content: ""; position: absolute; left: -1.6rem; top: .45em;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--gold); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--gold);
}
.timeline .tl-year { font-weight: 800; color: var(--brand); font-size: 1.02rem; }
.timeline .tl-body { color: var(--ink-soft); font-size: .93rem; margin-top: .25rem; }
.timeline .tl-body strong { color: var(--ink); }

/* locations */
.location-card {
  display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow);
}
.location-card + .location-card { margin-top: 1.2rem; }
.location-card img { border-radius: 10px; width: 100%; object-fit: cover; }
.location-card h3 { color: var(--brand-dark); font-size: 1.02rem; }
.location-card .loc-en { color: var(--ink-soft); font-size: .85rem; margin-bottom: .5rem; }
.location-card address { font-style: normal; color: var(--ink-soft); font-size: .9rem; }
.area-label {
  display: inline-block; background: var(--brand); color: #fff;
  border-radius: 999px; padding: .25rem 1.1rem; font-weight: 700; font-size: .88rem;
  margin: 2.2rem 0 1.1rem;
}
.area-label:first-of-type { margin-top: 0; }

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem; box-shadow: var(--shadow); text-align: center;
}
.contact-card .flag { font-size: 1.9rem; }
.contact-card h3 { margin: .5rem 0 .2rem; font-size: 1.05rem; }
.contact-card p { color: var(--ink-soft); font-size: .87rem; margin-bottom: 1rem; }

.download-list { list-style: none; display: grid; gap: .8rem; }
.download-list a {
  display: flex; align-items: center; gap: .9rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem 1.2rem; font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow); transition: .2s;
}
.download-list a:hover { text-decoration: none; border-color: var(--brand); color: var(--brand); transform: translateX(3px); }
.download-list a::before { content: "📄"; font-size: 1.3rem; }
.download-list small { margin-left: auto; color: var(--ink-soft); font-weight: 400; }

/* --------------------------------------------------------------------------
   Video modal
   -------------------------------------------------------------------------- */
.video-modal {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(12, 9, 7, .88);
  display: flex; align-items: center; justify-content: center; padding: 4vh 4vw;
}
.video-modal[hidden] { display: none; }
.video-modal .modal-box { width: min(960px, 100%); position: relative; }
.video-modal video { width: 100%; border-radius: 12px; box-shadow: var(--shadow-lg); background: #000; }
.modal-close {
  position: absolute; top: -44px; right: 0;
  background: none; border: 0; color: #fff; font-size: 1.9rem; cursor: pointer; line-height: 1;
}

/* inline video */
.inline-video { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: #000; }
.inline-video + .inline-video { margin-top: 1.6rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--dark); color: #cfc7bd; margin-top: 4rem;
  padding: 3rem 0 2rem; font-size: .88rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: .8rem; }
.site-footer ul { list-style: none; display: grid; gap: .45rem; }
.site-footer a { color: #cfc7bd; }
.site-footer a:hover { color: var(--gold); }
.footer-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; flex-wrap: wrap; }
.footer-brand img { height: 46px; width: auto; background: #fff; border-radius: 8px; padding: 5px 12px; }
.footer-brand b { color: #fff; }
.footer-bottom {
  border-top: 1px solid #3a332d; margin-top: 2.2rem; padding-top: 1.2rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: #9a9188; font-size: .8rem;
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .card-grid.cols-3, .contact-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .product-item { grid-template-columns: 1fr; }
  .ceo-card { grid-template-columns: 1fr; }
  .ceo-card img { max-width: 220px; }
  .location-card { grid-template-columns: 1fr; }
  .location-card img { max-height: 220px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .brand img { height: 40px; }
  .brand-text { display: none; }
  .header-inner { min-height: 68px; gap: .7rem; }
  .login-open { padding: .3rem .9rem; font-size: .8rem; margin-left: auto; }
  .nav-toggle { margin-left: 0; }
  .site-nav {
    position: fixed; inset: 72px 0 auto 0; z-index: 90;
    background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; gap: 0; padding: .6rem 0; margin: 0;
    box-shadow: var(--shadow-lg);
    display: none;
  }
  body.nav-open .site-nav { display: flex; }
  .site-nav a { padding: .8rem 6%; border-bottom: 0; }
  .lang-switch { margin-left: auto; }
  .card-grid.cols-3, .card-grid.cols-2, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { min-height: 60vh; }
}
