/* Core layout */
:root {
  --brand-primary: #1b5cff;
  --brand-secondary: #0f2b6d;
  --accent-success: #00a37b;
  --accent-warning: #ff9f1c;
  --text-main: #1c1c1e;
  --text-muted: #6c6c70;
  --surface: #ffffff;
  --background: #f5f7fb;
  --border: #d5d8e0;
  --shadow: 0 14px 40px rgba(15, 43, 109, 0.15);
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text-main);
  line-height: 1.6;
}

/* iOS/Notch safe-area support: add system insets where supported */
body {
  padding-top: constant(safe-area-inset-top);
  padding-bottom: constant(safe-area-inset-bottom);
  padding-left: constant(safe-area-inset-left);
  padding-right: constant(safe-area-inset-right);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.wrapper {
  width: min(1080px, 100% - 48px);
  margin: 0 auto;
}

header {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: var(--surface);
  padding: 32px 0;
  box-shadow: var(--shadow);
}

header .wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
}

nav ul {
  display: flex;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}

nav a {
  color: var(--surface);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease-in-out;
}

nav a:hover,
nav a:focus {
  opacity: 0.7;
}

.hero {
  background: var(--surface);
  border-radius: 16px;
  padding: 40px;
  margin: 32px auto;
  box-shadow: var(--shadow);
}

/* Hero 내 로고들을 세로로 쌓이게 처리 (브랜드 로고, iTouchON 로고) */
.hero .hero-brand,
.hero .hero-logo {
  display: block;
  margin: 0 0 12px 0;
  max-width: 360px;
  width: 100%;
  height: auto;
}

.hero .hero-brand {
  max-width: 160px;
}
.hero .hero-logo {
  max-width: 360px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 4vw, 2.8rem);
}

.hero p {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--brand-primary);
  color: var(--surface);
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  box-shadow: 0 10px 24px rgba(27, 92, 255, 0.24);
}

.btn:hover,
.btn:focus {
  transform: translateY(-2px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 32px 0 48px;
}

.card {
  background: var(--surface);
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 32px rgba(15, 43, 109, 0.1);
}

.card h2 {
  margin: 0 0 12px;
  font-size: 1.4rem;
}

.card p {
  margin: 0 0 18px;
  color: var(--text-muted);
}

.card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.section-title {
  margin: 48px 0 16px;
  font-size: 1.8rem;
}

.callout {
  border-left: 4px solid var(--brand-primary);
  background: rgba(27, 92, 255, 0.08);
  padding: 16px 20px;
  border-radius: 14px;
  color: var(--text-muted);
}

.breadcrumb {
  margin: 18px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.platform-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-primary);
  color: var(--surface);
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
}

.step-list {
  display: grid;
  gap: 16px;
  margin: 24px 0 40px;
  list-style: none;
  padding: 0;
}

.step {
  background: var(--surface);
  border-radius: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(15, 43, 109, 0.08);
}

.step header {
  background: none;
  color: inherit;
  padding: 0;
  box-shadow: none;
}

.step-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.step-number {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: var(--surface);
  font-weight: 700;
}

.step-title h3 {
  margin: 0;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-content {
  margin-top: 14px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.step-content ul {
  margin: 0 0 16px;
  padding-left: 18px;
}

.step-description {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.step-image {
  display: block;
  max-width: 400px;
  width: 100%;
  height: auto;
  margin-top: 16px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 43, 109, 0.08);
}

.app-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 0;
}

.app-icon-image {
  width: 120px;
  max-width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 16px 36px rgba(15, 43, 109, 0.18);
}

.app-icon-label {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: center;
}

@media (min-width: 768px) {
  .step-content {
    flex-direction: row;
    align-items: flex-start;
  }

  .step-description {
    flex: 1 1 50%;
  }

  .step-media {
    flex: 1 1 40%;
    justify-content: flex-end;
  }

  .step-media .step-image,
  .step-media .app-icon {
    margin-top: 0;
  }
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.badge-list li {
  background: rgba(27, 92, 255, 0.12);
  color: var(--brand-primary);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

footer {
  margin: 64px 0 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}


action-bar {
  display: block;
  margin-top: 32px;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.note {
  background: rgba(0, 163, 123, 0.12);
  border-left: 4px solid var(--accent-success);
  padding: 12px 16px;
  border-radius: 14px;
  margin-top: 12px;
}

.warning {
  background: rgba(255, 159, 28, 0.14);
  border-left: 4px solid var(--accent-warning);
}

.qr-code {
  display: block;
  width: 200px;
  height: auto;
  margin: calc(24px + env(safe-area-inset-top, 0px)) auto calc(24px + env(safe-area-inset-bottom, 0px)) auto;
}

@media (max-width: 720px) {
  .wrapper {
    width: min(1080px, 100% - 32px);
  }

  header .wrapper {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding: 28px 24px;
  }

  .step-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .action-bar {
    flex-direction: column;
    align-items: stretch;
  }
}
