/* HIMARU — site styles */
:root {
  --navy: #1f2d5c;
  --navy-dark: #141d3d;
  --accent: #e8662a;
  --ink: #1d2230;
  --muted: #5d6475;
  --line: #e3e6ee;
  --bg: #ffffff;
  --bg-soft: #f4f6fa;
  --radius: 10px;
  --max: 1200px;
  --font: "Montserrat", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo img { height: 46px; width: auto; }
.nav { display: flex; gap: 6px; }
.nav > li { position: relative; list-style: none; }
.nav { margin: 0; padding: 0; }
.nav > li > a {
  display: block; padding: 10px 16px;
  font-weight: 600; font-size: 15px; letter-spacing: .04em;
  color: var(--navy);
  border-radius: 6px;
}
.nav > li > a:hover, .nav > li > a.active { color: var(--accent); }
.nav .sub {
  position: absolute; top: 100%; left: 0; min-width: 190px;
  margin: 0; padding: 8px 0; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 10px 30px rgba(20,29,61,.12);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: .2s;
}
.nav > li:hover .sub, .nav > li:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.nav .sub a { display: block; padding: 8px 18px; font-size: 14px; color: var(--muted); }
.nav .sub a:hover { color: var(--accent); background: var(--bg-soft); }
.menu-toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer;
}
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: .2s; }

/* ---------- Hero (home) ---------- */
.hero { position: relative; height: min(88vh, 760px); min-height: 460px; overflow: hidden; color: #fff; background: var(--navy-dark); }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.2s ease;
}
.hero-slide.on { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,29,61,.75), rgba(20,29,61,.2)); }
.hero-text { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.hero-text .eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .2em; font-size: 14px; }
.hero-text h1 { font-size: clamp(34px, 6vw, 64px); font-weight: 800; letter-spacing: .02em; margin: 12px 0 16px; }
.hero-text p { font-size: clamp(16px, 2vw, 20px); max-width: 560px; opacity: .9; }
.hero-dots { position: absolute; z-index: 3; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.hero-dots button { width: 34px; height: 4px; border: 0; padding: 0; background: rgba(255,255,255,.4); cursor: pointer; }
.hero-dots button.on { background: #fff; }

/* ---------- Page banner (sub pages) ---------- */
.page-banner {
  position: relative; color: #fff; padding: 90px 0 70px;
  background-size: cover; background-position: center;
}
.page-banner::before { content: ""; position: absolute; inset: 0; background: rgba(20,29,61,.68); }
.page-banner .container { position: relative; }
.page-banner .eyebrow { font-size: 13px; letter-spacing: .2em; color: #ffb48f; font-weight: 600; }
.page-banner h1 { font-size: clamp(30px, 5vw, 46px); margin: 8px 0 0; }

.subnav { border-bottom: 1px solid var(--line); background: #fff; }
.subnav .container { display: flex; gap: 4px; overflow-x: auto; }
.subnav a { padding: 16px 18px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; border-bottom: 3px solid transparent; }
.subnav a.active, .subnav a:hover { color: var(--navy); border-color: var(--accent); }

/* ---------- Sections ---------- */
#app { min-height: 70vh; }
.section { padding: 90px 0; }
[id] { scroll-margin-top: 76px; }
.section.soft { background: var(--bg-soft); }
.section-head { text-align: center; margin-bottom: 50px; }
.section-head .eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .2em; font-size: 13px; }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); color: var(--navy); margin-top: 8px; }
.section-head p { color: var(--muted); max-width: 640px; margin: 0 auto; }
.bar { width: 48px; height: 3px; background: var(--accent); margin: 16px auto 0; }

/* Home: about cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3;
  color: #fff; display: flex; align-items: flex-end; padding: 26px;
  background-size: cover; background-position: center;
}
.card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,29,61,.9), rgba(20,29,61,.15)); transition: .3s; }
.card:hover::before { background: linear-gradient(0deg, rgba(232,102,42,.85), rgba(20,29,61,.2)); }
.card > div { position: relative; }
.card h3 { font-size: 22px; margin-bottom: 4px; }
.card span { font-size: 14px; opacity: .85; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat strong { display: block; font-size: clamp(30px, 4vw, 44px); color: var(--navy); font-weight: 800; }
.stat span { color: var(--muted); font-size: 14px; letter-spacing: .05em; }

/* Contact strip */
.contact-strip { background: var(--navy); color: #fff; }
.contact-strip .container { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: center; padding-top: 70px; padding-bottom: 70px; }
.contact-strip h2 { font-size: 34px; }
.contact-strip p { color: #c4cbe0; }
.contact-strip ul { list-style: none; margin: 0; padding: 0; color: #dfe3f0; }
.contact-strip li { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.contact-strip li b { color: #fff; display: inline-block; min-width: 110px; }

.btn {
  display: inline-block; padding: 13px 28px; border-radius: 6px;
  background: var(--accent); color: #fff; font-weight: 700; letter-spacing: .03em;
  border: 0; cursor: pointer; font-size: 15px; font-family: inherit;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border: 1px solid #fff; }

/* Intro */
.intro-img { border-radius: var(--radius); overflow: hidden; margin-bottom: 50px; }
.intro-img img { width: 100%; }
.intro-text { max-width: 820px; margin: 0 auto; font-size: 17px; color: var(--muted); }
.intro-text h2 { color: var(--navy); font-size: 28px; }

/* History timeline */
.timeline { position: relative; max-width: 860px; margin: 0 auto; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--line); transform: translateX(-50%); }
.timeline li { position: relative; width: 50%; padding: 0 44px 44px; }
.timeline li:nth-child(odd) { text-align: right; }
.timeline li:nth-child(even) { margin-left: 50%; }
.timeline li::after { content: ""; position: absolute; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.timeline li:nth-child(odd)::after { right: -7px; }
.timeline li:nth-child(even)::after { left: -7px; }
.timeline .year { font-size: 30px; font-weight: 800; color: var(--navy); }
.timeline p { margin: 4px 0 0; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; cursor: zoom-in; }

/* Factory */
.tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 40px; flex-wrap: wrap; }
.tabs button {
  padding: 12px 26px; border-radius: 40px; border: 1px solid var(--line);
  background: #fff; color: var(--navy); font-weight: 700; cursor: pointer; font-family: inherit; font-size: 14px;
}
.tabs button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab-panel { display: none; }
.tab-panel.on { display: block; }
.factory-top { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; margin-bottom: 60px; }
.factory-top img { border-radius: var(--radius); width: 100%; }
.factory-top h3 { font-size: 26px; color: var(--navy); }
.spec { width: 100%; border-collapse: collapse; }
.spec th, .spec td { padding: 14px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.spec th { color: var(--muted); font-weight: 600; width: 45%; font-size: 14px; letter-spacing: .03em; }
.spec td { font-weight: 700; color: var(--navy); }
.spec .note td { font-weight: 400; color: var(--muted); font-size: 14px; }
.h-sub { font-size: 20px; color: var(--navy); margin: 0 0 20px; }
.addr { background: var(--bg-soft); border-radius: var(--radius); padding: 24px 28px; margin-top: 30px; }
.addr p { margin: 4px 0; color: var(--muted); }
.addr b { color: var(--navy); }
.map { width: 100%; height: 400px; border: 0; border-radius: var(--radius); margin-top: 20px; }

/* Process */
.sketches { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 70px; }
.sketches img { width: 150px; height: 190px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--line); }
.sketches .arrow { color: var(--accent); font-size: 26px; font-weight: 800; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 24px; text-align: center; position: relative;
}
.step::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; top: 16px; left: 18px; font-weight: 800; font-size: 14px; color: var(--accent);
}
.step img { width: 74px; height: 74px; margin: 0 auto 14px; object-fit: contain; }
.step h4 { color: var(--navy); font-size: 17px; }
.step p { color: var(--muted); font-size: 14px; margin: 0; }

/* Products */
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.filters button {
  padding: 10px 20px; border-radius: 40px; border: 1px solid var(--line); background: #fff;
  font-family: inherit; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer;
}
.filters button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.product {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  cursor: zoom-in; transition: .2s;
}
.product:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(20,29,61,.1); }
.product .ph { aspect-ratio: 1/1; padding: 20px; display: flex; align-items: center; justify-content: center; background: #fff; }
.product .ph img { max-height: 100%; object-fit: contain; }
.product .cap { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--navy); letter-spacing: .04em; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 500; background: rgba(10,14,30,.9);
  display: none; align-items: center; justify-content: center; padding: 30px;
}
.lightbox.on { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; background: #fff; border-radius: 8px; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 40px; cursor: pointer; padding: 10px 18px; }
.lightbox .close { top: 10px; right: 10px; }
.lightbox .prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 6px; top: 50%; transform: translateY(-50%); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 6px; letter-spacing: .03em; }
.form input, .form select, .form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px;
  font-family: inherit; font-size: 15px; background: #fff; color: var(--ink);
}
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid rgba(232,102,42,.35); border-color: var(--accent); }
.form textarea { min-height: 160px; resize: vertical; }
.form .hp { display: none; }
.form-msg { margin-top: 10px; font-weight: 600; }

/* Footer */
.site-footer { background: var(--navy-dark); color: #9aa3bf; font-size: 14px; }
.site-footer .container { display: flex; gap: 40px; padding-top: 50px; padding-bottom: 50px; align-items: flex-start; }
.site-footer .flogo { background: #fff; padding: 8px 10px; border-radius: 6px; flex-shrink: 0; }
.site-footer .flogo img { height: 36px; }
.site-footer p { margin: 2px 0; }
.site-footer .copy { margin-top: 12px; color: #6f7898; }
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent); color: #fff; border: 0; font-size: 20px; cursor: pointer;
  opacity: 0; visibility: hidden; transition: .25s; box-shadow: 0 6px 18px rgba(0,0,0,.2);
}
.to-top.on { opacity: 1; visibility: visible; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 0;
    display: none; max-height: calc(100vh - 76px); overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav > li > a { padding: 14px 20px; }
  .nav .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 8px; }
  .nav .sub a { padding: 8px 36px; }
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .contact-strip .container, .factory-top, .contact-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .site-footer .container { flex-direction: column; gap: 20px; }
}
@media (max-width: 600px) {
  .section { padding: 64px 0; }
  .page-banner { padding: 60px 0 46px; }
  .steps, .form { grid-template-columns: 1fr; }
  .timeline::before { left: 8px; }
  .timeline li, .timeline li:nth-child(even) { width: 100%; margin-left: 0; text-align: left; padding: 0 0 34px 38px; }
  .timeline li:nth-child(odd)::after, .timeline li:nth-child(even)::after { left: 1px; right: auto; }
  .sketches img { width: 110px; height: 140px; }
  .sketches .arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
