/* 씨에스모바일 — 통신사 시세 안내 페이지
   폰트: Pretendard (CDN) */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700;800;900&display=swap');

:root {
  --bg:        #F6F5F1;
  --paper:     #FFFFFF;
  --ink:       #16171B;
  --ink-soft:  #55575E;
  --line:      #E4E1D8;
  --accent:    #C8452E;      /* 브랜드 포인트(주황빛 레드) - 로고/브랜드 없을 때 기본값 */
  --skt:       #E4032E;
  --kt:        #0091DA;
  --lgu:       #E6007E;
  --new-tag:   #F5A623;
  --radius:    14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Decorative background blobs (hero area) ---------- */
.top-decor {
  position: relative;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.28;
  pointer-events: none;
  z-index: 0;
}
.blob-skt { width: 420px; height: 420px; background: var(--skt); top: -180px; right: -120px; opacity: 0.16; }
.blob-lgu { width: 360px; height: 360px; background: var(--lgu); top: 60px; left: -140px; opacity: 0.14; }
.blob-kt  { width: 420px; height: 420px; background: var(--kt);  top: -80px; right: 60px; opacity: 0.20; }
.top-decor > .wrap { position: relative; z-index: 1; }

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

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

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246,245,241,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand img {
  height: 30px;
  width: auto;
  display: block;
}
.topbar-cta {
  display: flex;
  gap: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-kakao   { background: #FEE500; color: #191600; }
.btn-call    { background: var(--ink); color: #fff; }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 40px;
  position: relative;
}
.carrier-panel, .tabs { scroll-margin-top: 80px; }
.hero-updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 6px 14px;
  margin-bottom: 22px;
}
.hero-updated .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2FA84F;
  display: inline-block;
}
.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-badge-pill {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.9);
  padding: 6px 14px;
  border-radius: 100px;
}
.hero h1 {
  font-size: 42px;
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  max-width: 640px;
}
.hero p {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 0 28px;
}
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-cta .btn { padding: 14px 22px; font-size: 15px; border-radius: 12px; }

.hero-banner {
  margin-top: 32px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 40px -18px rgba(20,10,50,0.35);
}
.hero-banner img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  display: block;
}
@media (max-width: 640px) {
  .hero-banner img { max-height: 200px; }
}

/* ---------- Carrier tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.tab {
  appearance: none;
  border: none;
  background: none;
  padding: 14px 4px;
  margin-right: 28px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  font-family: inherit;
}
.tab.active { color: var(--ink); }
.tab[data-carrier="SKT"].active { border-color: var(--skt); }
.tab[data-carrier="KT"].active  { border-color: var(--kt); }
.tab[data-carrier="LGU"].active { border-color: var(--lgu); }

/* ---------- Phone grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-bottom: 72px;
}
.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 4px solid var(--carrier-color, var(--accent));
  padding: 22px 20px 20px;
  overflow: hidden;
}
.card .new-ribbon {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--new-tag);
  color: #1A1200;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 100px;
}
.card .icon-tile {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(255,255,255,0.38), transparent 45%),
    linear-gradient(150deg, var(--carrier-color, var(--accent)) 0%, rgba(8,8,10,0.85) 130%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  transform: perspective(280px) rotateY(-14deg) rotateX(7deg);
  box-shadow:
    6px 10px 18px -6px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.35);
}
.card .icon-tile::before {
  content: "";
  position: absolute;
  top: -35%; left: -25%;
  width: 75%; height: 75%;
  background: radial-gradient(circle, rgba(255,255,255,0.65), transparent 70%);
  transform: rotate(-18deg);
  pointer-events: none;
}
.card .icon-tile svg {
  width: 22px;
  height: 34px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.4));
}
.card .card-photo {
  width: 100%;
  height: 156px;
  border-radius: 12px;
  background: #F1F0EA;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 14px;
}
.card .card-photo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.card h3 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.card .subsidy-label {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 2px;
}
.card .subsidy-amount {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 14px;
}
.card .subsidy-amount span {
  font-size: 15px;
  font-weight: 700;
  margin-left: 2px;
}
.plan-table {
  width: 100%;
  font-size: 13px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.plan-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  color: var(--ink-soft);
}
.plan-row .plan-price {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.card .card-cta {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.card .card-cta .btn {
  flex: 1;
  justify-content: center;
  padding: 9px 10px;
  font-size: 13px;
}
.card .device-price {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.card .color-swatches {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.color-dot {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: block;
  width: 15px;
  height: 15px;
  min-width: 15px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
  margin: 0;
  line-height: 0;
  font-size: 0;
  outline-offset: 2px;
}
.color-dot.selected {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink), inset 0 0 0 1px rgba(255,255,255,0.4);
}
.color-more {
  font-size: 11px;
  color: var(--ink-soft);
  margin-left: 2px;
}
.card .extra-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: #1E6B34;
  background: #EAF7EE;
  border: 1px solid #BEE3C6;
  border-radius: 100px;
  padding: 3px 10px;
  margin-bottom: 12px;
}
.card .compare-btn {
  width: 100%;
  justify-content: center;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  padding: 10px;
  font-size: 13.5px;
  margin-bottom: 8px;
}
.card .spec-view-btn {
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: underline;
  padding: 4px;
  margin-bottom: 8px;
  cursor: pointer;
}

/* ---------- Detail modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,15,13,0.5);
  z-index: 80;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-sheet {
  background: var(--paper);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 18px 18px 0 0;
  padding: 22px 22px 28px;
  position: relative;
}
@media (min-width: 640px) {
  .modal-overlay { align-items: center; }
  .modal-sheet { border-radius: 18px; max-height: 82vh; }
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
}
.modal-sheet h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 26px 4px 0;
}
.modal-device-price {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.modal-section-label {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
}
.plan-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}
.plan-picker label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 14px;
}
.plan-picker input { margin-right: 10px; }
.plan-picker label.selected {
  border-color: var(--ink);
  background: #FAFAF7;
}
.plan-picker .plan-picker-price { font-weight: 700; font-variant-numeric: tabular-nums; }

.compare-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.compare-col {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 16px 14px;
  position: relative;
}
.compare-col.best { border-color: #2FA84F; background: #F4FBF5; }
.compare-col .best-tag {
  position: absolute; top: -11px; left: 12px;
  background: #2FA84F; color: #fff; font-size: 10.5px; font-weight: 800;
  padding: 3px 8px; border-radius: 100px;
}
.compare-col h4 { font-size: 13.5px; margin: 0 0 12px; font-weight: 700; color: var(--ink-soft); }
.compare-col .monthly {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-bottom: 2px;
}
.compare-col .monthly span { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.compare-col .breakdown { font-size: 12px; color: var(--ink-soft); margin-bottom: 10px; line-height: 1.6; }
.compare-col .total-24 { font-size: 12.5px; border-top: 1px dashed var(--line); padding-top: 8px; color: var(--ink-soft); }
.compare-col .total-24 b { color: var(--ink); font-variant-numeric: tabular-nums; }
.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-soft);
  padding: 3px 0;
  font-variant-numeric: tabular-nums;
}
.calc-row-strong { font-weight: 700; color: var(--ink); font-size: 12.5px; }
.calc-row-total { font-weight: 800; color: var(--ink); font-size: 15px; padding-top: 2px; }
.calc-divider { border-top: 1px dashed var(--line); margin: 6px 0; }

.modal-note {
  font-size: 11.5px;
  color: var(--ink-soft);
  margin: 14px 0 18px;
  line-height: 1.6;
}
.modal-cta { display: flex; gap: 8px; }

.modal-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.modal-color-row .color-dot { width: 26px; height: 26px; }
.modal-color-name { font-size: 13px; color: var(--ink-soft); margin-left: 4px; }
.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.spec-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}
.spec-label { display: block; font-size: 11px; color: var(--ink-soft); font-weight: 700; margin-bottom: 2px; }
.spec-value { display: block; font-size: 13px; color: var(--ink); font-weight: 600; }
.spec-camera {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 22px;
  line-height: 1.7;
}
.spec-camera b { color: var(--ink); margin-right: 6px; }
.spec-disclaimer { font-size: 10.5px; color: var(--ink-soft); margin: 6px 0 18px; text-align: center; }

.modal-options-grid {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 14px;
  margin-bottom: 20px;
}
.modal-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  gap: 12px;
}
.modal-option-row:last-child { border-bottom: none; }
.modal-option-row > span:first-child { color: var(--ink-soft); flex-shrink: 0; }
.modal-fixed-value { font-weight: 700; color: var(--ink); }
.modal-toggle-group { display: flex; gap: 6px; }
.modal-toggle-btn {
  border: 1.5px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.modal-toggle-btn.selected {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.modal-number-input {
  width: 120px;
  text-align: right;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.modal-cta .btn { flex: 1; justify-content: center; padding: 13px; font-size: 14.5px; }

@media (max-width: 460px) {
  .compare-cols { grid-template-columns: 1fr; }
}

/* ---------- Floating mobile contact bar ---------- */
.float-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  gap: 8px;
}
.float-bar .btn { flex: 1; justify-content: center; padding: 13px; font-size: 15px; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 60px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
footer .foot-brand { font-weight: 800; color: var(--ink); margin-bottom: 8px; font-size: 14px; }
footer p { margin: 3px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 32px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 27px; }
  .topbar-cta { display: none; }
  .float-bar { display: flex; }
  body { padding-bottom: 64px; }
  .hero-cta { display: none; }
}

/* keyboard focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
