/* ==========================================================
   PIPETY — Static Brand Website
   Company: SSOKER Inc. / 주식회사 쏘커
   Structure:
   1. Variables & Reset
   2. Base Typography
   3. Layout Utilities
   4. Header / Navigation
   5. Buttons
   6. Hero (Home) & Page Hero (Subpages)
   7. Sections & Cards
   8. Tables
   9. Forms (Inquiry)
   10. CTA Band
   11. Footer
   12. Responsive
   ========================================================== */

/* 1. Variables & Reset
   ---------------------------------------------------------- */
:root {
  /* Brand colors */
  --navy: #2c3987;          /* PIPETY primary (confirmed brand color) */
  --navy-dark: #202a63;
  --navy-deep: #161d45;
  --accent: #e8590c;        /* industrial orange — CTA / point */
  --accent-dark: #cf4d08;

  /* Neutrals */
  --ink: #1d2433;
  --text: #3a4256;
  --text-light: #6b7280;
  --line: #dde2ec;
  --bg: #ffffff;
  --bg-soft: #f4f6fb;
  --bg-navy-tint: #eef1f9;

  /* Typography */
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;

  /* Layout */
  --container: 1140px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(22, 29, 69, 0.08);
  --shadow-md: 0 8px 24px rgba(22, 29, 69, 0.10);
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word; /* long tokens (URLs, emails) still wrap */
  overflow-x: clip; /* prevent horizontal scroll from any overflowing element */
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* 2. Base Typography
   ---------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  color: var(--ink);
  line-height: 1.3;
  font-weight: 700;
}

.section-label {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: 1.9rem;
  margin-bottom: 0.8rem;
}

.section-desc {
  max-width: 720px;
  color: var(--text-light);
}

.section-head {
  margin-bottom: 2.4rem;
}

.section-head.center {
  text-align: center;
}

.section-head.center .section-desc {
  margin-left: auto;
  margin-right: auto;
}

/* 3. Layout Utilities
   ---------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 84px 0;
}

.section.soft {
  background: var(--bg-soft);
}

.section.navy {
  background: var(--navy-deep);
}

.section.navy .section-title,
.section.navy h3 {
  color: #fff;
}

.section.navy p {
  color: #c6cce6;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

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

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  color: var(--navy);
  white-space: nowrap;
}

.logo .logo-ko {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
}

.main-nav ul {
  display: flex;
  gap: 4px;
}

.main-nav a {
  display: block;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--navy);
  background: var(--bg-navy-tint);
}

.main-nav a.active {
  color: var(--navy);
  background: var(--bg-navy-tint);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hamburger (mobile only) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  position: relative;
  flex: 0 0 auto;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 11px;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle span { top: 21px; }
.nav-toggle span::before { top: -6px; left: 0; }
.nav-toggle span::after { top: 6px; left: 0; }

.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* 5. Buttons
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  min-height: 48px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-navy {
  background: var(--navy);
  color: #fff;
}

.btn-navy:hover {
  background: var(--navy-dark);
}

.btn-outline {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.btn-outline:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  background: transparent;
}

.btn-outline-light:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-sm {
  padding: 9px 18px;
  min-height: 40px;
  font-size: 0.9rem;
}

.btn-disabled {
  background: var(--bg-soft);
  color: var(--text-light);
  border-color: var(--line);
  cursor: default;
  pointer-events: none;
}

/* 6. Hero (Home) & Page Hero (Subpages)
   ---------------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 68%, var(--navy-dark) 100%);
  color: #fff;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
  padding: 88px 24px 110px;  /* keep 24px side padding (shorthand overrides .container) */
}

.hero h1 {
  color: #fff;
  font-size: 2.6rem;
  line-height: 1.25;
  margin-bottom: 1.1rem;
}

.hero h1 .accent {
  color: #ffb488;
}

.hero-sub {
  color: #ccd2ee;
  font-size: 1.08rem;
  max-width: 540px;
  margin-bottom: 1.8rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 2.2rem;
}

.hero-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.keyword-chip {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #dfe4f7;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 6px 14px;
}

.hero-visual {
  min-width: 0;
}


/* 6-1. Keyword band — floating white card overlapping the hero bottom
   ---------------------------------------------------------- */
.keyword-band {
  background: transparent;
  padding: 0;
}

.keyword-band ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 20px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(22, 29, 69, 0.14);
  padding: 26px 30px;
  margin-top: -38px;      /* pull the card up over the hero */
  position: relative;
  z-index: 5;
}

.keyword-band .keyword-chip {
  color: var(--navy);
  background: var(--bg-navy-tint);
  border: 1px solid transparent;
  font-size: 0.9rem;
  padding: 8px 18px;
}

/* Subpage hero */
.page-hero {
  background: linear-gradient(120deg, var(--navy-deep), var(--navy));
  color: #fff;
  padding: 64px 0;
}

.page-hero .breadcrumb {
  font-size: 0.85rem;
  color: #aab2d9;
  margin-bottom: 0.7rem;
}

.page-hero h1 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 0.7rem;
}

.page-hero p {
  color: #ccd2ee;
  max-width: 680px;
}

/* 7. Sections & Cards
   ---------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: #c6cde4;
}

a.card:hover {
  transform: translateY(-3px);
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.55rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-light);
}

.card .card-en {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
}

/* Icon shapes (pure CSS/SVG based, no external images) */
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg-navy-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  color: var(--navy);
}

.card-icon svg {
  width: 28px;
  height: 28px;
}

/* Numbered step list */
.step-list {
  counter-reset: step;
  display: grid;
  gap: 16px;
}

.step-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.step-item::before {
  counter-increment: step;
  content: counter(step);
  flex: 0 0 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-item h4 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.step-item p {
  font-size: 0.92rem;
  color: var(--text-light);
}

/* Notice / info box */
.notice {
  border-left: 4px solid var(--accent);
  background: #fff7f2;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  font-size: 0.95rem;
}

.notice strong {
  color: var(--ink);
}

/* Placeholder tag */
.placeholder-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  background: var(--bg-soft);
  border: 1px dashed #b9c1d6;
  border-radius: 6px;
  padding: 4px 12px;
}

/* Reveal on scroll
   Hidden state applies ONLY when JS is running (html.js is added by
   main.js). Without JS, all content stays visible. */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

html.js .reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* 8. Tables
   ---------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  min-width: 560px;
}

.data-table th,
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table thead th {
  background: var(--bg-navy-tint);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* 9. Forms (Inquiry)
   ---------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.form-field .required {
  color: var(--accent);
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  width: 100%;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
  border-color: var(--navy);
}

.form-field textarea {
  min-height: 150px;
  resize: vertical;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.form-consent input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--navy);
}

.form-hint {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* 9-1. Consent modal
   ---------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 29, 69, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 20px;
}

.modal-overlay[hidden] { display: none; }

.modal {
  background: #fff;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px 26px;
  box-shadow: 0 24px 60px rgba(22, 29, 69, 0.3);
}

.modal h2 {
  font-size: 1.2rem;
  margin-bottom: 0.9rem;
}

.modal p,
.modal li {
  font-size: 0.92rem;
  color: var(--text);
}

.modal ul {
  list-style: disc;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
  margin: 0.9rem 0;
}

.modal .modal-note {
  font-size: 0.85rem;
  color: var(--text-light);
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 12px 14px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 1.4rem;
}

.modal-actions .btn { flex: 1; }

.consent-detail-link {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

/* 10. CTA Band
   ---------------------------------------------------------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 72px 0;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 0.7rem;
}

.cta-band p {
  color: #ccd2ee;
  max-width: 620px;
  margin: 0 auto 1.8rem;
}

.cta-band .cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* 11. Footer
   ---------------------------------------------------------- */
.site-footer {
  background: var(--navy-deep);
  color: #aab2d9;
  padding: 56px 0 32px;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 0.8rem;
}

.footer-brand p {
  max-width: 360px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: #8890b8;
}

/* 11-1. Language switch (KO/EN)
   ---------------------------------------------------------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-light);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: color 0.15s, border-color 0.15s;
  flex: 0 0 auto;
}

.lang-switch:hover {
  color: var(--navy);
  border-color: var(--navy);
}

/* 11-2. English typography adjustments
   English copy runs longer per word — tighten headings slightly,
   use normal word-breaking, and slightly reduce large sizes.
   ---------------------------------------------------------- */
html[lang="en"] body {
  word-break: normal;
  overflow-wrap: break-word;
}

html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4 {
  letter-spacing: -0.015em;
}

html[lang="en"] .hero h1 {
  font-size: 2.45rem;
  line-height: 1.18;
}

html[lang="en"] .page-hero h1 {
  font-size: 2.05rem;
}

html[lang="en"] .section-title {
  font-size: 1.75rem;
}

html[lang="en"] .keyword-chip {
  font-size: 0.78rem;
}

/* 12. Responsive
   ---------------------------------------------------------- */

/* 12-0. English pages: switch to hamburger earlier.
   The EN menu (7 items + logo subtitle + EN switch + CTA) is much
   wider than the Korean one and overflows below ~1160px. */
@media (max-width: 1160px) {
  html[lang="en"] .nav-toggle { display: block; }

  html[lang="en"] .logo .logo-ko { display: none; }

  html[lang="en"] .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }

  html[lang="en"] .main-nav.open { display: block; }

  html[lang="en"] .main-nav ul {
    flex-direction: column;
    padding: 12px 16px 18px;
    gap: 2px;
  }

  html[lang="en"] .main-nav a {
    padding: 13px 12px;
    font-size: 1rem;
  }
}

@media (max-width: 1024px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }

  .main-nav a { padding: 10px 10px; font-size: 0.9rem; }
}

@media (max-width: 860px) {
  /* Mobile navigation */
  .nav-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }

  .main-nav.open { display: block; }

  .main-nav ul {
    flex-direction: column;
    padding: 12px 16px 18px;
    gap: 2px;
  }

  .main-nav a {
    padding: 13px 12px;
    font-size: 1rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 60px 24px 88px;
    gap: 44px;
  }

  /* Center the hero illustration on mobile */
  .hero-visual img {
    margin: 0 auto;
    width: 100%;
    max-width: 420px;
  }

  /* More breathing room for hero copy on mobile */
  .hero h1 {
    font-size: 1.9rem;
    line-height: 1.32;
    margin-bottom: 1.3rem;
  }

  .hero-sub {
    line-height: 1.8;
    margin-bottom: 2.1rem;
  }

  .hero-actions { gap: 12px; margin-bottom: 0; }

  .keyword-band ul { padding: 20px 18px; gap: 10px 12px; margin-top: -30px; }
  .keyword-band .keyword-chip { font-size: 0.82rem; padding: 7px 14px; }
  .page-hero h1 { font-size: 1.7rem; }
  .section { padding: 60px 0; }
  .section-title { font-size: 1.55rem; }

  html[lang="en"] .hero h1 { font-size: 1.75rem; }
  html[lang="en"] .page-hero h1 { font-size: 1.55rem; }
  html[lang="en"] .section-title { font-size: 1.45rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  /* Inquiry page: form + aside collapse to one column */
  .grid[style*="1.6fr"] { grid-template-columns: 1fr !important; }
}

@media (max-width: 640px) {
  /* Tables: drop the fixed min-width and let cells wrap on phones */
  table.data-table { min-width: 0; }

  .data-table th,
  .data-table td {
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: break-word;
    padding: 11px 12px;
    font-size: 0.88rem;
  }

  .data-table tbody th[scope="row"] {
    min-width: 96px;
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4 { grid-template-columns: 1fr; }

  .form-grid { grid-template-columns: 1fr; }

  .header-cta .btn { padding: 9px 14px; min-height: 42px; font-size: 0.88rem; }
  .logo { font-size: 1.25rem; }
  .logo .logo-ko { display: none; }

  .hero-actions .btn { flex: 1 1 auto; }
}
