/* storm-drainage-construction — rain concept, self-contained */

@font-face {
  font-family: "Gmarket Sans";
  font-display: swap;
  src: local("Gmarket Sans");
}

:root {
  --rain-primary: #1D4E89;
  --rain-accent: #7FB2E5;
  --rain-bg: #F4F9FD;
  --rain-bg-alt: #EAF3FB;
  --rain-text: #1B2A38;
  --rain-border: #D3E4F5;
  --font-main: "Gmarket Sans", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--rain-text);
  background: var(--rain-bg);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-family: var(--font-main);
  color: var(--rain-primary);
  line-height: 1.4;
  margin: 0 0 16px;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 16px; }

/* Header */
.rain-header {
  background: #ffffff;
  border-bottom: 1px solid var(--rain-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--rain-primary);
  text-decoration: none;
  font-size: 1.05rem;
}

.brand-drop {
  width: 18px;
  height: 24px;
  fill: var(--rain-accent);
}

.top-nav {
  display: flex;
  gap: 8px;
}

.top-nav a {
  text-decoration: none;
  color: var(--rain-primary);
  font-weight: 600;
  padding: 10px 14px;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-radius: 24px;
}

.top-nav a:hover { background: var(--rain-bg-alt); }

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(180deg, #E5F1FB 0%, #FAFDFF 100%);
  padding-bottom: 40px;
}

.hero-inner {
  padding-top: 48px;
  padding-bottom: 60px;
  text-align: left;
}

.lede {
  font-size: 1.05rem;
  max-width: 620px;
  color: var(--rain-text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--rain-primary);
  color: #ffffff;
}

.btn-primary:hover { background: #163f6e; }

.btn-outline {
  background: #ffffff;
  color: var(--rain-primary);
  border-color: var(--rain-primary);
}

.btn-outline:hover { background: var(--rain-bg-alt); }

/* Wave dividers */
.wave-divider {
  display: block;
  width: 100%;
  height: 60px;
  margin-top: -2px;
}

.wave-divider path { transition: none; }

/* Sections */
.section { padding: 48px 0 0; background: #ffffff; }
.suit-section { background: #ffffff; }
.principle-section { background: var(--rain-bg-alt); }
.table-section { background: #ffffff; }
.gallery-section { background: var(--rain-bg-alt); }
.checklist-section { background: #ffffff; }
.faq-section { background: var(--rain-bg-alt); }
.related-section { background: #ffffff; }

.section .wrap { padding-bottom: 48px; }

/* Chip list */
.chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--rain-bg-alt);
  border: 1px solid var(--rain-border);
  color: var(--rain-primary);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
}

.chip-list svg {
  width: 12px;
  height: 12px;
  fill: var(--rain-accent);
}

/* Zigzag blocks */
.zigzag-block {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.zigzag-block:last-child { margin-bottom: 0; }

.zz-media picture,
.zz-media img {
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
}

.zz-media {
  margin: 0;
}

.zz-text p { margin-bottom: 0; }

/* Table */
.table-scroll {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--rain-border);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 620px;
  background: #ffffff;
}

caption {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--rain-primary);
  font-weight: 700;
  background: var(--rain-bg-alt);
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--rain-border);
  font-size: 0.95rem;
}

thead th {
  background: var(--rain-primary);
  color: #ffffff;
}

tbody tr:nth-child(even) { background: var(--rain-bg); }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.gallery-grid figure {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--rain-border);
}

/* Checklist */
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  font-size: 1rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 20px;
  background: var(--rain-accent);
  clip-path: path("M8 0C8 0 0 9 0 14a8 8 0 0 0 16 0C16 9 8 0 8 0Z");
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--rain-border);
  border-radius: 14px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: none;
  padding: 14px 20px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  color: var(--rain-primary);
  cursor: pointer;
  text-align: left;
}

.faq-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: var(--rain-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(180deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 20px;
}

.faq-a p { padding-bottom: 18px; margin: 0; color: var(--rain-text); }

.faq-item.open .faq-a { max-height: 300px; }

/* Related */
.related-section a {
  color: var(--rain-primary);
  font-weight: 700;
  text-decoration: underline;
}

/* CTA */
.cta-section {
  background: linear-gradient(135deg, var(--rain-primary), #2f6bab);
  color: #ffffff;
  text-align: center;
  padding-bottom: 56px;
}

.cta-section h2 { color: #ffffff; }
.cta-section p { color: #E5F1FB; }
.cta-inner { padding-top: 48px; }
.cta-inner .hero-actions { justify-content: center; }
.cta-section .btn-outline {
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
}
.cta-section .btn-outline:hover { background: rgba(255,255,255,0.12); }

/* Footer */
.site-footer {
  background: #102A44;
  color: #C9DBEF;
  padding: 40px 20px 100px;
  font-size: 0.9rem;
}

.site-footer nav ul {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

.site-footer nav a {
  color: #C9DBEF;
  text-decoration: none;
}

.site-footer nav a:hover { color: #ffffff; text-decoration: underline; }

.site-footer address {
  font-style: normal;
  max-width: 1080px;
  margin: 0 auto 16px;
  line-height: 1.8;
}

.site-footer address a { color: #ffffff; }

.site-footer p {
  max-width: 1080px;
  margin: 0 auto;
  color: #8FAAC9;
}

/* Mobile fixed CTA bar */
.mobile-cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #ffffff;
  border-top: 1px solid var(--rain-border);
  box-shadow: 0 -4px 12px rgba(29,78,137,0.08);
  z-index: 30;
}

.mobile-cta-bar .btn { flex: 1; min-height: 48px; }

body { padding-bottom: 76px; }

/* ===== Breakpoints ===== */

@media (min-width: 480px) {
  h1 { font-size: 2.1rem; }
}

@media (min-width: 768px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.8rem; }

  .zigzag-block {
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }

  .zigzag-block.reverse { flex-direction: row-reverse; }

  .zz-media, .zz-text { flex: 1 1 50%; min-width: 0; }

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

@media (min-width: 1024px) {
  .mobile-cta-bar { display: none; }
  body { padding-bottom: 0; }

  .hero-inner { padding-top: 72px; padding-bottom: 88px; }
  h1 { font-size: 2.8rem; }

  .section { padding-top: 64px; }
  .section .wrap { padding-bottom: 64px; }
}

@media (min-width: 1280px) {
  .wrap { max-width: 1180px; }
}
