/* =========================================================
   iFlo, inc. - styles.css
   Water / industrial tone: cool slate neutrals + one cobalt accent.
   One radius (12px), one accent, light + dark via prefers-color-scheme.
   Mobile-first. Breakpoints: 640px, 1024px.
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: light dark;

  --bg: #F6F8FA;
  --surface: #FFFFFF;
  --tint: #EAF1F9;          /* accent-tinted surface */
  --line: #D9E0E7;
  --text: #0F1720;
  --text-2: #475462;        /* 7.3:1 on --bg */
  --accent: #1B4E8F;        /* cobalt, 8.6:1 on white */
  --accent-hover: #143D72;
  --on-accent: #F6F8FA;
  --shadow: 0 16px 40px -20px rgb(15 40 70 / 0.28);

  --font: "Pretendard", "Pretendard Variable", system-ui, -apple-system,
    "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;

  --radius: 12px;
  --max: 1200px;
  --gutter: 1rem;
  --header-h: 68px;
  --section: clamp(4rem, 3rem + 5vw, 7rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1016;
    --surface: #121A23;
    --tint: #142235;
    --line: #243140;
    --text: #E6ECF1;
    --text-2: #A3B1BF;
    --accent: #7FB1EC;
    --accent-hover: #A5C8F2;
    --on-accent: #0B1016;
    --shadow: 0 16px 40px -20px rgb(0 0 0 / 0.6);
  }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

::selection { background: var(--accent); color: var(--on-accent); }

h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.025em; font-weight: 700; text-wrap: balance; }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

section[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; top: 0.5rem; left: 0.5rem; z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; border-radius: var(--radius);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.skip-link:hover { color: var(--on-accent); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.section { padding-block: var(--section); }
.section__title { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.625rem); max-width: 22ch; }
.section__lead { max-width: 60ch; margin-top: 1rem; color: var(--text-2); font-size: 1.0625rem; }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.75rem 1.375rem;
  font: inherit; font-weight: 700; white-space: nowrap; text-decoration: none;
  border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), transform 200ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn i { font-size: 1.125rem; transition: transform 200ms var(--ease); }
.btn:hover i { transform: translateX(3px); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn--ghost { color: var(--text); border-color: var(--line); background: var(--surface); }
.btn--ghost:hover { color: var(--accent); border-color: var(--accent); }
.btn__meta { color: var(--text-2); font-size: 0.8125rem; font-weight: 500; }
.btn:hover i.ph-download-simple { transform: translateY(2px); }
.btn--sm { min-height: 40px; padding: 0.5rem 1rem; font-size: 0.875rem; }

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  position: relative;
  display: flex; align-items: center; gap: 0.75rem;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-right: auto;
  color: var(--text); font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.01em;
  text-decoration: none;
}
.logo:hover { color: var(--text); }
.logo svg { width: 22px; height: 22px; color: var(--accent); }

.lang { display: inline-flex; gap: 2px; font-size: 0.8125rem; font-weight: 600; }
.lang a, .lang span {
  display: inline-grid; place-items: center;
  min-width: 36px; min-height: 36px; padding-inline: 0.375rem;
  color: var(--text-2); text-decoration: none; border-radius: var(--radius);
}
.lang [aria-current] { color: var(--text); background: var(--tint); }
.lang a:hover { color: var(--accent); }

.nav-toggle {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; padding: 0; margin-right: -0.5rem;
  background: transparent; color: var(--text); border: 0; border-radius: var(--radius);
  font-size: 1.5rem; cursor: pointer;
}

.site-nav {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.site-nav.is-open { display: block; }
.site-nav__list { padding: 0.5rem var(--gutter) 1rem; }
.site-nav a { display: block; padding: 0.75rem 0; color: var(--text); font-weight: 500; text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
.header-cta { display: none; }

/* ---------- 5. Hero: full-bleed photo behind the copy ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; align-items: center;
  min-height: clamp(24rem, 58vh, 34rem);
  padding-block: 2rem 2.75rem;
}
/* One wash rule at every width: near-solid behind the text column, fading out after it. Uses --bg so dark mode works. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--bg) 90%, transparent) 0,
    color-mix(in srgb, var(--bg) 72%, transparent) max(40rem, 45%),
    transparent max(62rem, 78%));
}
.hero__grid { display: grid; gap: 2rem; align-items: center; }
.hero__title { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.875rem); line-height: 1.18; letter-spacing: -0.035em; }
.hero__title span { color: var(--accent); }
.hero__text { max-width: 30rem; margin-top: 1.25rem; color: var(--text-2); font-size: 1.125rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero__media { position: absolute; inset: 0; z-index: -2; margin: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 6. Why: bento (3 cells, 3 surfaces) ---------- */
.bento { display: grid; gap: 1rem; margin-top: 2.5rem; }
.bento__cell {
  display: grid; align-content: space-between; gap: 2.5rem;
  padding: 1.75rem;
  border-radius: var(--radius);
}
.bento__cell i { font-size: 2rem; }
.bento__cell h3 { font-size: 1.375rem; }
.bento__cell p { margin-top: 0.5rem; max-width: 42ch; }
.bento__cell--accent { background: var(--accent); color: var(--on-accent); }
.bento__cell--accent h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.bento__cell--accent p { opacity: 0.9; font-size: 1.0625rem; }
.bento__cell--tint { background: var(--tint); }
.bento__cell--tint i { color: var(--accent); }
.bento__cell--tint p, .bento__cell--plain p { color: var(--text-2); }
.bento__cell--plain { background: var(--surface); border: 1px solid var(--line); }
.bento__cell--plain i { color: var(--accent); }

/* ---------- 7. Equipment: featured vs rest ---------- */
.feature {
  display: grid; gap: 2rem;
  margin-top: 2.5rem; padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.feature__name { display: flex; align-items: center; gap: 0.75rem; font-size: 1.5rem; }
.feature__name i { color: var(--accent); font-size: 1.75rem; }
.feature__desc { margin-top: 0.75rem; max-width: 46ch; color: var(--text-2); }
.feature__specs { display: grid; gap: 1.5rem; }
.feature__specs dt { color: var(--text-2); font-size: 0.875rem; }
.feature__specs dd {
  order: -1;
  color: var(--text); font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem); white-space: nowrap;
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
}
.feature__specs dd small { font-size: 0.5em; font-weight: 600; letter-spacing: 0; margin-left: 0.15em; color: var(--text-2); }
.feature__specs div { display: flex; flex-direction: column; gap: 0.25rem; }

.others { display: grid; gap: 0.5rem 2.5rem; margin-top: 2.5rem; }
.other summary {
  display: grid; grid-template-columns: 2.5rem 1fr auto; gap: 0.25rem 1rem; align-items: center;
  padding: 1rem 0; cursor: pointer; list-style: none;
}
.other summary::-webkit-details-marker { display: none; }
.other__icon {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem;
  border-radius: var(--radius); background: var(--tint); color: var(--accent); font-size: 1.25rem;
}
.other__name { font-weight: 700; font-size: 1.0625rem; }
.other__role { grid-column: 2; color: var(--text-2); font-size: 0.9375rem; line-height: 1.5; }
.other__chev { grid-column: 3; grid-row: 1 / span 2; color: var(--text-2); font-size: 1.125rem; transition: transform 240ms var(--ease); }
.other[open] .other__chev { transform: rotate(180deg); color: var(--accent); }
.other summary:hover .other__name { color: var(--accent); }
.other__specs {
  display: grid; grid-template-columns: max-content 1fr; gap: 0.375rem 1.5rem;
  margin: 0 0 1rem 3.5rem; padding: 1rem 1.25rem;
  background: var(--surface); border-radius: var(--radius);
  font-size: 0.9375rem;
}
.other__specs dt { color: var(--text-2); }
.other__specs dd { font-weight: 600; }
.note { margin-top: 2rem; color: var(--text-2); font-size: 0.875rem; }

/* ---------- 8. Process: connected track ---------- */
.process { position: relative; display: grid; gap: 0; margin-top: 3rem; }
.step:not(:last-child)::before {
  content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px;
  background: var(--accent);
}
.step { position: relative; display: grid; grid-template-columns: 24px 1fr; align-content: start; gap: 0 1.25rem; padding-bottom: 2rem; }
.step:last-child { padding-bottom: 0; }
.step__node {
  position: relative; z-index: 1;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.step__node::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--accent); }
.step h3 { font-size: 1.125rem; line-height: 24px; }
.step p { grid-column: 2; margin-top: 0.375rem; color: var(--text-2); font-size: 0.9375rem; max-width: 36ch; }
.step__who { grid-column: 2; margin-top: 0.625rem; color: var(--accent); font-size: 0.8125rem; font-weight: 700; }

/* ---------- 9. Contact: tinted band ---------- */
.contact { background: var(--tint); }
.contact__grid { display: grid; gap: 2.5rem; }
.checklist { margin-top: 2rem; display: grid; gap: 0.75rem; }
.checklist li { display: grid; grid-template-columns: 1.5rem 1fr; gap: 0.5rem; }
.checklist i { color: var(--accent); font-size: 1.25rem; margin-top: 0.15rem; }
.checklist__title { margin-top: 2.5rem; font-size: 1rem; }

.contact__card {
  padding: 1.75rem;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
}
.contact__card dl { display: grid; gap: 1.25rem; }
.contact__card dt { color: var(--text-2); font-size: 0.875rem; }
.contact__card dd { font-size: 1.125rem; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- 10. Footer ---------- */
.site-footer { padding-block: 2rem; border-top: 1px solid var(--line); color: var(--text-2); font-size: 0.875rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }

/* ---------- 10b. Product page (vz3000/) ---------- */
.section--tint { background: var(--tint); }
.feature__link { margin-top: 1.5rem; }
.crumbs { display: flex; align-items: center; gap: 0.375rem; margin-bottom: 1rem; color: var(--text-2); font-size: 0.875rem; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--accent); }
.site-nav a[aria-current] { color: var(--accent); }

.product-hero { padding-block: 2.5rem 3.5rem; background: linear-gradient(180deg, var(--bg), var(--tint)); }
.product-hero__grid { display: grid; gap: 2.5rem; align-items: center; }
.product-hero__specs { margin-top: 2rem; grid-template-columns: repeat(3, auto); justify-content: start; gap: 1.5rem; }
.product-hero__specs dd { font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2.25rem); }
.product-hero__media { display: grid; place-items: center; }
.product-hero__media img { width: auto; max-height: min(34rem, 70vh, 22rem + 20vw); filter: drop-shadow(0 24px 30px rgb(15 40 70 / 0.22)); }

.cards { display: grid; gap: 1rem; margin-top: 2.5rem; }
/* Top-align so icons and titles line up across cards regardless of text length */
.cards .bento__cell { align-content: start; }

.spec-layout, .flow-layout { display: grid; gap: 2.5rem; }
.spec-table { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.5rem 1.5rem; }
.spec-table div { display: grid; grid-template-columns: minmax(6.5rem, 35%) 1fr; gap: 1rem; padding: 0.875rem 0; }
.spec-table div + div { border-top: 1px solid var(--line); }
.spec-table dt { color: var(--text-2); font-size: 0.9375rem; }
.spec-table dd { font-weight: 600; }

.components { display: grid; gap: 1rem; margin-top: 2.5rem; }
.component {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.25rem; align-items: start;
  padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.component img { width: 5.5rem; height: 5.5rem; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--tint); }
.component h3 { font-size: 1.125rem; }
.component ul { margin-top: 0.625rem; display: grid; gap: 0.25rem; color: var(--text-2); font-size: 0.9375rem; }
.component li { position: relative; padding-left: 0.875rem; }
.component li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.flow img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

.apps { display: grid; gap: 1.5rem 2.5rem; margin-top: 2.5rem; }
.apps li { display: grid; grid-template-columns: 2.5rem 1fr; gap: 0.25rem 1rem; }
.apps i { grid-row: span 2; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: var(--radius); background: var(--tint); color: var(--accent); font-size: 1.25rem; }
.apps h3 { font-size: 1.0625rem; }
.apps p { color: var(--text-2); font-size: 0.9375rem; }
.app-photos { margin-top: 2.5rem; }
.app-photos div { display: grid; gap: 1rem; }
.app-photos img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.app-photos figcaption { margin-top: 0.75rem; color: var(--text-2); font-size: 0.8125rem; }

.cta { display: grid; gap: 2rem; align-items: center; }

/* ---------- 11. Motion (JS-gated so content shows without JS) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * { animation: rise 900ms var(--ease) both; }
  .hero__copy > :nth-child(2) { animation-delay: 80ms; }
  .hero__copy > :nth-child(3) { animation-delay: 160ms; }

  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .process { --progress: 0; }
  .js .process.is-in { --progress: 1; }
}
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

/* ---------- 12. >= 640px ---------- */
@media (min-width: 640px) {
  :root { --gutter: 1.5rem; }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento__cell--accent { grid-column: 1 / -1; }
  .feature__specs { grid-template-columns: repeat(3, auto); justify-content: start; gap: 2.5rem; }
  .cards, .components, .apps { grid-template-columns: 1fr 1fr; }
  .app-photos div { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 13. >= 1024px ---------- */
@media (min-width: 1024px) {
  :root { --gutter: 2rem; }

  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: block; position: static; background: none; border: 0; box-shadow: none; }
  .site-nav__list { display: flex; gap: 2rem; padding: 0; }
  .site-nav a { padding: 0.5rem 0; font-size: 0.9375rem; color: var(--text-2); }
  .site-nav a:hover { color: var(--accent); }
  .header-cta { display: inline-flex; }

  .hero { padding-block: 3.25rem 4rem; }

  .bento { grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; }
  .bento__cell { padding: 2.25rem; min-height: 15rem; }
  .bento__cell--accent { grid-column: 1; grid-row: 1 / span 2; min-height: 26rem; }

  .feature { grid-template-columns: 1fr 1.2fr; align-items: end; padding: 2.5rem; }
  .others { grid-template-columns: 1fr 1fr; }

  .process { grid-template-columns: repeat(6, 1fr); gap: 1.5rem; }
  .step:not(:last-child)::before { display: none; }
  .process::before, .process::after {
    content: ""; position: absolute; left: 12px; right: calc((100% - 7.5rem) / 6 - 12px); top: 11px; height: 2px;
  }
  .process::before { background: var(--line); }
  .process::after {
    background: var(--accent);
    transform-origin: left; transform: scaleX(var(--progress, 1));
    transition: transform 1400ms var(--ease);
  }
  .step { grid-template-columns: 1fr; gap: 0; padding-bottom: 0; }
  .step h3 { margin-top: 1.25rem; line-height: 1.35; }
  .step p, .step__who { grid-column: 1; }

  .product-hero { padding-block: 3.5rem 4.5rem; }
  .product-hero__grid { grid-template-columns: 1.2fr 1fr; gap: 4rem; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .spec-layout { grid-template-columns: 1fr 1.3fr; gap: 4rem; align-items: start; }
  .flow-layout { grid-template-columns: 1fr 1.6fr; gap: 4rem; align-items: center; }
  .cta { grid-template-columns: 1fr auto; gap: 4rem; }
  .contact__grid { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
  .contact__card { padding: 2.25rem; }
}
