/* Self-hosted fonts as per design system */
@font-face {
  font-family: "Nanum Square Round";
  src: url("../fonts/nanum-square-round-subset.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nanum Gothic";
  src: url("../fonts/nanum-gothic-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nanum Gothic";
  src: url("../fonts/nanum-gothic-subset.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colors from design system */
  --color-brand-primary: #4A3A2E;
  --color-brand-secondary: #D87D4A;
  --color-brand-accent: #E8A87C;
  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: #F7F4F0;
  --color-bg-tertiary: #EFEAE4;
  --color-text-primary: #2A2420;
  --color-text-secondary: #6B6158;
  --color-text-muted: #9A9188;
  --color-success: #2E7D5B;
  --color-warning: #C8862E;
  --color-error: #B3402E;
  --color-border: #D9D3CC;
  --color-divider: #E9E4DD;
  --color-overlay: rgba(42, 36, 32, 0.6);
  
  /* Typography */
  --font-family-display: "Nanum Square Round", "Nanum Gothic", sans-serif;
  --font-family-body: "Nanum Gothic", "Inter", sans-serif;
  --font-family-mono: "JetBrains Mono", monospace;
  
  /* Type scale */
  --text-display: clamp(2.5rem, 5vw, 4rem);
  --text-h1: clamp(1.75rem, 4vw, 2.5rem);
  --text-h2: clamp(1.5rem, 3.5vw, 2rem);
  --text-h3: clamp(1.25rem, 3vw, 1.5rem);
  --text-body-lg: 1.125rem;
  --text-body: 1rem;
  --text-body-sm: 0.875rem;
  --text-caption: 0.75rem;
  --text-button: 0.9375rem;
  --text-mono: 0.875rem;
  
  /* Spacing */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;
  --space-10: 64px;
  --space-12: 96px;
  
  /* Border radius */
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-display);
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text-primary);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Header */
.header {
  background-color: var(--color-bg-primary);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.header__logo {
  font-family: var(--font-family-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-brand-primary);
  text-decoration: none;
}

.header__nav {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}

.header__nav-link {
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: var(--text-body-sm);
  font-weight: 500;
  transition: color 0.2s;
}

.header__nav-link:hover {
  color: var(--color-brand-secondary);
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-family-body);
  font-size: var(--text-button);
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.btn--primary {
  background-color: var(--color-brand-primary);
  color: #FFFFFF;
}

.btn--primary:hover {
  background-color: var(--color-brand-secondary);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-brand-primary);
  border: 2px solid var(--color-brand-primary);
}

.btn--secondary:hover {
  background-color: var(--color-brand-primary);
  color: #FFFFFF;
}

/* Hero */
.hero {
  padding: var(--space-10) 0;
  background: linear-gradient(135deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
}

.hero__container {
  text-align: center;
}

.hero__title {
  font-size: var(--text-display);
  margin-bottom: var(--space-4);
}

.hero__subtitle {
  font-size: var(--text-body-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* Section */
.section {
  padding: var(--space-8) 0;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.section__title {
  margin-bottom: var(--space-3);
}

.section__subtitle {
  color: var(--color-text-secondary);
  font-size: var(--text-body-lg);
}

/* Card grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
}

/* Card */
.card {
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: 0 4px 12px rgba(42, 36, 32, 0.06);
  transition: all 0.2s;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(42, 36, 32, 0.10);
  transform: translateY(-2px);
}

.card__title {
  font-size: var(--text-h3);
  margin-bottom: var(--space-2);
}

.card__description {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

/* Footer */
.footer {
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: var(--space-8) 0 var(--space-6);
  margin-top: var(--space-12);
}

.footer__container {
  text-align: center;
}

.footer__text {
  color: var(--color-text-secondary);
  font-size: var(--text-body-sm);
}

/* Responsive */
@media (max-width: 768px) {
  .header__nav {
    display: none;
  }
  
  .hero {
    padding: var(--space-8) 0;
  }
  
  .section {
    padding: var(--space-6) 0;
  }
  
  .hero__actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero__actions .btn {
    width: 100%;
  }
}
