/* ============================================================
   ION Chip Co., Ltd. — corporate site
   ============================================================ */

:root {
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --ink: #1f2937;
  --ink-strong: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-alt: #f7f9fc;
  --dark: #1f2937;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  --header-h: 68px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue-600); }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--ink-strong);
  text-align: center;
  letter-spacing: -.02em;
  margin: 0 0 48px;
}

.section-lead {
  max-width: 760px;
  margin: -28px auto 44px;
  text-align: center;
  color: var(--muted);
  font-size: 1.05rem;
}

section { padding: 88px 0; }

/* ---------- Header / nav ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo { display: flex; align-items: center; }
.logo-img { height: 46px; width: auto; }

.nav-menu {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--ink);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--blue-600);
  border-bottom-color: var(--blue-600);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  transition: transform .25s, opacity .2s;
}

.mobile-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 8px 24px 16px;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  padding: 12px 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

.mobile-menu a:last-child { border-bottom: none; }

/* ---------- Hero ---------- */

.hero {
  padding: 0;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  color: #fff;
  background: linear-gradient(135deg, #5b73e8 0%, #6d5ec7 45%, #8b5cb8 100%);
}

.hero-container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 96px 24px;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.5rem, 6.5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 24px;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.6vw, 1.55rem);
  font-style: italic;
  font-weight: 500;
  margin: 0 0 16px;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  margin: 0 0 40px;
  opacity: .95;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .98rem;
  text-decoration: none;
  transition: transform .2s, background .2s, color .2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--blue-700); }

.btn-secondary { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.85); }
.btn-secondary:hover { background: rgba(255,255,255,.14); }

/* ---------- About ---------- */

.about { background: var(--bg-alt); }

.about-content {
  display: grid;
  grid-template-columns: 1.2fr .9fr;
  gap: 48px;
  align-items: start;
}

.about-text p {
  margin: 0 0 20px;
  font-size: 1.05rem;
  color: #374151;
}

.company-info {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px;
}

.company-info h3 {
  margin: 0 0 18px;
  font-size: 1.15rem;
  color: var(--blue-600);
  font-weight: 700;
}

.company-info dl { margin: 0; }

.company-info dl > div {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.company-info dl > div:first-child { border-top: none; }

.company-info dt { font-weight: 600; color: var(--ink-strong); font-size: .92rem; }
.company-info dd { margin: 0; color: #4b5563; font-size: .95rem; }

/* ---------- Vision ---------- */

.vision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.vision-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--blue-600);
}

.vision-card h3 { margin: 0 0 8px; font-size: 1.15rem; color: var(--blue-600); }
.vision-card p { margin: 0; color: var(--muted); }

/* ---------- Organization ---------- */

.organization { background: var(--bg-alt); }

.org-chart {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 44px 32px;
  overflow-x: auto;
}

.org-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 16px 20px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(16,24,40,.05);
}

.org-box h4 { margin: 0 0 6px; font-size: 1rem; color: var(--ink-strong); font-weight: 700; }
.org-box p { margin: 0; font-size: .8rem; color: var(--muted); line-height: 1.45; }

.org-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.org-side { width: 230px; flex: none; }

.org-ceo {
  width: 250px;
  flex: none;
  background: var(--blue-600);
  border-color: var(--blue-600);
}

.org-ceo h4 { color: #fff; }
.org-ceo p { color: rgba(255,255,255,.85); }

.org-connector-h {
  width: 44px;
  height: 1px;
  background: #cbd5e1;
  flex: none;
}

.org-stem {
  width: 1px;
  height: 34px;
  background: #cbd5e1;
  margin: 0 auto;
}

.org-depts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
  padding-top: 24px;
}

/* horizontal rail linking the three departments */
.org-depts::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16.6%;
  right: 16.6%;
  height: 1px;
  background: #cbd5e1;
}

.org-branch { display: flex; flex-direction: column; align-items: center; position: relative; }

.org-branch::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  width: 1px;
  height: 24px;
  background: #cbd5e1;
}

.org-dept { width: 100%; max-width: 300px; }

.org-stem-sm { width: 1px; height: 26px; background: #cbd5e1; }

.org-subs {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  position: relative;
  padding-top: 18px;
  width: 100%;
}

.org-subs::before {
  content: "";
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 1px;
  background: #cbd5e1;
}

.org-sub {
  background: #f3f4f6;
  border-color: #e5e7eb;
  padding: 14px 14px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink-strong);
  flex: 0 1 auto;
  min-width: 0;
}

.org-sub-group {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
}

.org-sub-group h5 {
  margin: 0 0 2px;
  font-size: .92rem;
  font-weight: 700;
  color: var(--ink-strong);
  text-align: center;
}

.org-leaf { font-size: .88rem; font-weight: 500; padding: 10px 12px; }

/* ---------- Business value chain ---------- */

.value-chain { background: var(--bg-alt); }

.value-chain-main {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 36px;
  text-align: center;
  margin-bottom: 32px;
}

.value-chain-main h3 { margin: 0 0 10px; font-size: 1.6rem; color: var(--blue-600); font-weight: 700; }
.value-chain-main p { margin: 0; color: #4b5563; }

.value-chain-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}

.value-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px;
  text-align: center;
}

.value-item h4 { margin: 0 0 10px; color: var(--blue-600); font-size: 1.05rem; font-weight: 700; }
.value-item p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Portfolio ---------- */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.portfolio-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.portfolio-card h3 {
  margin: 0 0 18px;
  font-size: 1.5rem;
  color: var(--blue-600);
  font-weight: 700;
}

.portfolio-card ul { margin: 0; padding: 0; list-style: none; }

.portfolio-card li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 12px;
  font-size: .95rem;
  color: #374151;
}

.portfolio-card li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--blue-500);
  font-weight: 700;
}

/* ---------- Products ---------- */

.products { background: var(--bg-alt); }

.product-category { margin-bottom: 56px; }

.product-category h3 {
  margin: 0 0 20px;
  font-size: 1.55rem;
  color: var(--blue-600);
  font-weight: 700;
}

.product-table-container {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}

.product-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: .88rem;
}

.product-table thead th {
  background: var(--blue-600);
  color: #fff;
  text-align: left;
  font-weight: 600;
  padding: 14px 16px;
  white-space: nowrap;
}

.product-table tbody td {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  color: #4b5563;
  vertical-align: top;
}

.product-table tbody td:first-child {
  font-weight: 600;
  color: var(--ink-strong);
  white-space: nowrap;
}

.product-table tbody tr:hover td { background: #f9fafb; }

.products-note {
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
  margin: 0;
}

/* ---------- Global network ---------- */

.map-wrap {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.network-map-img { width: 100%; }

.pin {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.pin-dot {
  width: 13px;
  height: 13px;
  border-radius: 50% 50% 50% 0;
  background: #ef4444;
  transform: rotate(-45deg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

.pin-label {
  position: absolute;
  top: 50%;
  white-space: nowrap;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink-strong);
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
}

.pin-label::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 14px;
  height: 1px;
  background: #ef4444;
}

.label-right { left: 22px; transform: translateY(-55%); }
.label-right::before { right: 100%; }

.label-left { right: 22px; transform: translateY(-55%); }
.label-left::before { left: 100%; }

.network-legend {
  display: none;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.network-legend li {
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-strong);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
}

.network-legend li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  margin-right: 8px;
  vertical-align: middle;
}

/* ---------- Contact ---------- */

.contact-info-centered { text-align: center; max-width: 720px; margin: 0 auto; }

.contact-info-centered h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink-strong);
  margin: 0 0 16px;
}

.contact-info-centered > p { color: var(--muted); margin: 0 0 28px; }

.contact-details p { margin: 6px 0; color: #4b5563; }
.contact-details strong { color: var(--ink-strong); }

.btn-contact { margin-top: 28px; }

/* ---------- Footer ---------- */

.footer {
  background: var(--dark);
  color: #d1d5db;
  padding: 60px 0 28px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
}

.footer-brand h3 { margin: 0 0 10px; color: var(--blue-500); font-size: 1.4rem; font-weight: 700; }
.footer-brand p { margin: 0; font-style: italic; color: #9ca3af; }

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.footer-section h4 { margin: 0 0 14px; color: #fff; font-size: 1rem; font-weight: 600; }
.footer-section ul { margin: 0; padding: 0; list-style: none; }
.footer-section li { margin-bottom: 10px; }

.footer-section a {
  color: #d1d5db;
  text-decoration: none;
  font-size: .95rem;
  transition: color .2s;
}

.footer-section a:hover { color: var(--blue-500); }

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 24px;
  text-align: center;
}

.footer-bottom p { margin: 0; color: #9ca3af; font-size: .9rem; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .about-content { grid-template-columns: 1fr; gap: 32px; }
  .org-top { flex-direction: column; gap: 16px; }
  .org-connector-h { width: 1px; height: 20px; }
  .org-side, .org-ceo { width: 100%; max-width: 340px; }
  .org-depts { grid-template-columns: 1fr; }
  .org-depts::before { display: none; }
  .org-branch::before { display: none; }
  .footer-content { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  section { padding: 64px 0; }
  .nav-menu { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero { min-height: auto; }
  .hero-container { padding: 80px 24px; }
  .company-info dl > div { grid-template-columns: 1fr; gap: 2px; }
  .org-chart { padding: 28px 18px; }

  /* labels get cramped on small screens — show the legend instead */
  .pin-label { display: none; }
  .network-legend { display: flex; }
}
