:root {
  --color-bg: #FAF6F0;
  --color-surface: #FFFDF9;
  --color-text: #2A2321;
  --color-text-muted: #5C4F4A;
  --color-primary: #D94E34;
  --color-secondary: #E5A93B;
  --color-border: #E8DDD0;
  --color-overlay: rgba(42, 35, 33, 0.62);
  --color-glass: rgba(250, 246, 240, 0.82);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 4px 24px rgba(42, 35, 33, 0.08);
  --shadow-card: 0 8px 32px rgba(42, 35, 33, 0.12);
  --transition-fast: 0.3s ease;
  --transition-smooth: 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 72rem;
  --header-height: 4.5rem;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus-visible {
  color: var(--color-secondary);
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}

h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-muted);
}

p:last-child {
  margin-bottom: 0;
}

.site-header {
  position: relative;
  z-index: 100;
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--color-border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brand-text {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-text:hover {
  color: var(--color-primary);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--space-lg);
}

.nav-desktop a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  padding: var(--space-xs) 0;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-fast);
}

.nav-desktop a:hover::after,
.nav-desktop a:focus-visible::after {
  width: 100%;
}

.burger-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  flex-shrink: 0;
  order: 99;
}

.burger-toggle:hover,
.burger-toggle:focus-visible {
  background: var(--color-bg);
  border-color: var(--color-primary);
}

.burger-line {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.burger-toggle.is-active .burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger-toggle.is-active .burger-line:nth-child(2) {
  opacity: 0;
}

.burger-toggle.is-active .burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(85vw, 20rem);
  height: 100vh;
  background: var(--color-surface);
  border-left: 2px solid var(--color-border);
  padding: calc(var(--header-height) + var(--space-lg)) var(--space-lg) var(--space-lg);
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
  z-index: 200;
  overflow-y: auto;
  box-shadow: var(--shadow-card);
}

.mobile-nav-panel.is-open {
  transform: translateX(0);
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 35, 33, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
  z-index: 150;
}

.mobile-nav-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.mobile-nav-list a {
  display: block;
  padding: var(--space-md);
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.mobile-nav-list a:hover,
.mobile-nav-list a:focus-visible {
  background: var(--color-bg);
  border-color: var(--color-border);
  color: var(--color-primary);
}

main {
  flex: 1;
}

.section-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-intro {
  max-width: 42rem;
  margin-bottom: var(--space-lg);
}

.hero-banner {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: clamp(18rem, 55vh, 32rem);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-banner-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(42, 35, 33, 0.75) 0%,
    rgba(217, 78, 52, 0.35) 50%,
    rgba(42, 35, 33, 0.65) 100%
  );
  z-index: 1;
}

.hero-banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  max-width: 48rem;
}

.hero-banner-content h1 {
  color: var(--color-surface);
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.hero-banner-content p {
  color: rgba(255, 253, 249, 0.92);
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin-bottom: var(--space-lg);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-primary);
  color: var(--color-surface);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: transparent;
  color: black;
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: var(--space-lg);
  align-items: start;
}

.mosaic-card {
  background: var(--color-surface);
  border: 3px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
}

.mosaic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.mosaic-card-offset {
  margin-top: var(--space-lg);
}

.card-image-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--space-md);
  border: 2px solid var(--color-border);
  aspect-ratio: 4 / 3;
  max-height: 14rem;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-accent-bar {
  width: 3rem;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: 2px;
  margin-bottom: var(--space-md);
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.split-layout-reverse .split-visual {
  order: -1;
}

.split-visual {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 3px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  max-width: 28rem;
  margin: 0 auto;
}

.split-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.progress-track {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  height: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--color-border);
  margin: var(--space-sm) 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--radius-lg);
  transition: width var(--transition-smooth);
}

.challenge-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 3px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.challenge-row-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
}

.challenge-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.challenge-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  font-size: 0.9rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  font-size: 0.85rem;
  font-weight: 500;
}

.watercolor-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  max-width: 24rem;
  margin: var(--space-lg) auto;
}

.watercolor-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}

.watercolor-cell.level-1 { background: rgba(229, 169, 59, 0.25); }
.watercolor-cell.level-2 { background: rgba(229, 169, 59, 0.45); }
.watercolor-cell.level-3 { background: rgba(217, 78, 52, 0.35); }
.watercolor-cell.level-4 { background: rgba(217, 78, 52, 0.55); }
.watercolor-cell.level-5 { background: rgba(217, 78, 52, 0.75); }

.newspaper-feed {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.feed-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 3px solid var(--color-border);
  border-radius: var(--radius-md);
}

.feed-item-wide {
  grid-column: 1 / -1;
}

.feed-item-image {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--color-border);
  max-height: 12rem;
}

.feed-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.feed-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-secondary);
}

.simulator-panel {
  background: var(--color-surface);
  border: 3px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  box-shadow: var(--shadow-card);
}

.simulator-output {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: linear-gradient(135deg, rgba(217, 78, 52, 0.08), rgba(229, 169, 59, 0.12));
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  text-align: center;
}

.simulator-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1.1;
}

.slider-group {
  margin-bottom: var(--space-lg);
}

.slider-group label {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
}

.slider-group input[type="range"] {
  width: 100%;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--space-lg);
}

.product-card {
  background: var(--color-surface);
  border: 3px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card-image {
  aspect-ratio: 4 / 3;
  max-height: 12rem;
  overflow: hidden;
  border-bottom: 2px solid var(--color-border);
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: auto;
  padding-top: var(--space-md);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.contact-info-block {
  background: var(--color-surface);
  border: 3px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-info-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  font-size: 0.95rem;
}

.contact-info-list i {
  color: var(--color-primary);
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-xs);
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-group textarea {
  min-height: 8rem;
  resize: vertical;
}

.consent-group {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.consent-group input {
  margin-top: 0.3rem;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}

.consent-group label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.map-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 3px solid var(--color-border);
  aspect-ratio: 16 / 9;
  max-height: 20rem;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.thankyou-wrap {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  max-width: 36rem;
  margin: 0 auto;
}

.thankyou-icon {
  font-size: 3rem;
  color: var(--color-secondary);
  margin-bottom: var(--space-lg);
}

.error-wrap {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 15vw, 8rem);
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-md);
}

.legal-content {
  max-width: 48rem;
  margin: 0 auto;
}

.legal-content h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  font-size: 1.35rem;
}

.legal-content h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  font-size: 1.1rem;
}

.legal-content ul {
  list-style: disc;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.legal-content li {
  margin-bottom: var(--space-xs);
  color: var(--color-text-muted);
}

.legal-date {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.site-footer {
  background: var(--color-text);
  color: rgba(250, 246, 240, 0.85);
  padding: var(--space-xl) var(--space-lg);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  text-align: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-surface);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
}

.footer-nav a {
  color: rgba(250, 246, 240, 0.8);
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--color-secondary);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(250, 246, 240, 0.15);
}

.footer-legal a {
  color: rgba(250, 246, 240, 0.65);
  font-size: 0.8rem;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--color-secondary);
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(250, 246, 240, 0.5);
}

.footer-contact {
  font-size: 0.85rem;
  color: rgba(250, 246, 240, 0.7);
}

.privacy-popup {
  position: fixed;
  bottom: var(--space-lg);
  left: var(--space-lg);
  right: var(--space-lg);
  max-width: 28rem;
  background: var(--color-surface);
  border: 3px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  z-index: 300;
  transform: translateY(calc(100% + var(--space-2xl)));
  transition: transform var(--transition-smooth);
}

.privacy-popup.is-visible {
  transform: translateY(0);
}

.privacy-popup p {
  font-size: 0.85rem;
  margin-bottom: var(--space-md);
}

.privacy-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.privacy-popup-actions .btn-primary,
.privacy-popup-actions .btn-secondary {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
}

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

.section-intro-centered {
  margin-left: auto;
  margin-right: auto;
}

.progress-fill-52 { width: 52%; }
.progress-fill-68 { width: 68%; }
.progress-fill-45 { width: 45%; }
.progress-fill-73 { width: 73%; }
.progress-fill-61 { width: 61%; }

.bg-alt {
  background: linear-gradient(180deg, transparent, rgba(232, 221, 208, 0.3));
}

@media (min-width: 640px) {
  .newspaper-feed {
    grid-template-columns: repeat(2, 1fr);
  }

  .feed-item-tall {
    grid-row: span 2;
  }

  .split-layout {
    grid-template-columns: 1fr 1fr;
  }

  .split-layout-reverse .split-visual {
    order: 0;
  }

  .contact-layout {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }

  .footer-nav,
  .footer-legal {
    justify-content: flex-start;
  }
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }

  .burger-toggle {
    display: none;
  }

  .feed-item {
    grid-template-columns: 1fr 1.2fr;
  }

  .feed-item-reverse {
    grid-template-columns: 1.2fr 1fr;
  }

  .feed-item-reverse .feed-item-image {
    order: 2;
  }
}

@media (max-width: 1023px) {
  .nav-desktop {
    display: none;
  }

  .burger-toggle {
    display: flex;
  }
}

@media (max-width: 480px) {
  .section-wrap {
    padding: var(--space-lg) var(--space-md);
  }

  .hero-banner-content {
    padding: var(--space-lg) var(--space-md);
  }

  .privacy-popup {
    left: var(--space-md);
    right: var(--space-md);
    bottom: var(--space-md);
  }
}
