/* ============================================================
   그때, 우리는 — 타임캡슐 서비스
   Aged Paper · Worn Diary Aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600;1,700&family=Noto+Serif+KR:wght@300;400;600;700&display=swap');

/* ---- VARIABLES ---- */
:root {
  --bg:            #F5EDD8;
  --bg-cream:      #EDE2C0;
  --bg-light:      #FAF7EF;
  --brown-dark:    #2A1A0A;
  --brown-mid:     #5C3D1E;
  --brown-warm:    #7A5230;
  --brown-light:   #A8784A;
  --gold:          #7B5B1A;
  --gold-light:    #B8956A;
  --border:        #C0A882;
  --border-light:  #D5C4A0;
  --text:          #2A1A0A;
  --text-muted:    #6B4E38;
  --white-warm:    #FAF7EF;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Serif KR', Georgia, 'Times New Roman', serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Paper grain overlay — stronger for worn diary feel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.80' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  opacity: 1;
}

/* ---- LAYOUT ---- */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---- HEADER ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(245, 237, 216, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: 'Cormorant Garamond', 'Noto Serif KR', serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--brown-dark);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.header-nav-btn {
  font-family: 'Noto Serif KR', serif;
  font-size: 0.85rem;
  color: var(--brown-mid);
  border: 1.5px solid var(--brown-mid);
  padding: 9px 26px;
  text-decoration: none;
  letter-spacing: 0.07em;
  transition: background 0.2s, color 0.2s;
}

.header-nav-btn:hover {
  background: var(--brown-mid);
  color: var(--white-warm);
}

/* ---- HERO ---- */
.hero {
  min-height: 91vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 32px;
  position: relative;
  overflow: hidden;
}

/* Aged paper vignette */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(42, 26, 10, 0.07) 100%);
  pointer-events: none;
}

/* Large faded rectangle — old envelope feel */
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(88vw, 860px);
  height: min(70vh, 620px);
  border: 1px solid rgba(92, 61, 30, 0.12);
  pointer-events: none;
}

.hero-postmark {
  position: absolute;
  top: 56px;
  right: calc(50% - 420px);
  width: 130px;
  height: 130px;
  border: 2.5px solid rgba(92, 61, 30, 0.18);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(-14deg);
  pointer-events: none;
}

.hero-postmark::before {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(92, 61, 30, 0.1);
  border-radius: 50%;
}

.hero-postmark span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  color: rgba(92, 61, 30, 0.24);
  text-transform: uppercase;
  text-align: center;
  line-height: 1.6;
}

.hero-inner {
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.hero-stamp-tag {
  display: inline-block;
  border: 1.5px solid rgba(92, 61, 30, 0.38);
  padding: 7px 22px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  color: var(--brown-warm);
  text-transform: uppercase;
  transform: rotate(-2deg);
  margin-bottom: 36px;
  opacity: 0.85;
}

.hero-title {
  font-family: 'Cormorant Garamond', 'Noto Serif KR', serif;
  font-size: clamp(3.8rem, 11vw, 8rem);
  font-weight: 600;
  color: var(--brown-dark);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 28px;
}

.hero-subtitle {
  font-family: 'Cormorant Garamond', 'Noto Serif KR', serif;
  font-style: italic;
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  color: var(--brown-mid);
  line-height: 1.7;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 0.975rem;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 52px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- BUTTON ---- */
.btn-primary {
  display: inline-block;
  background: var(--brown-mid);
  color: var(--white-warm);
  font-family: 'Noto Serif KR', serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  padding: 17px 52px;
  text-decoration: none;
  border: 2px solid var(--brown-mid);
  position: relative;
  transition: background 0.22s, border-color 0.22s, transform 0.18s, box-shadow 0.18s;
  cursor: pointer;
  font-weight: 600;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.btn-primary:hover {
  background: var(--brown-dark);
  border-color: var(--brown-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(42, 26, 10, 0.22);
}

/* ---- HOW IT WORKS ---- */
.how-section {
  background: var(--bg-cream);
  padding: 100px 0;
  position: relative;
}

.how-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

.section-eyebrow {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.92rem;
  color: var(--gold);
  letter-spacing: 0.26em;
  text-align: center;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.section-title {
  font-family: 'Cormorant Garamond', 'Noto Serif KR', serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--brown-dark);
  text-align: center;
  margin-bottom: 18px;
  letter-spacing: 0.01em;
}

.ornament {
  text-align: center;
  color: var(--gold-light);
  letter-spacing: 0.5em;
  font-size: 0.9rem;
  margin-bottom: 68px;
  opacity: 0.85;
}

.steps-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.step-card {
  flex: 1;
  background: rgba(237, 226, 192, 0.6);
  border: 1px solid var(--border);
  padding: 44px 28px 40px;
  text-align: center;
  position: relative;
}

.step-card::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(192, 168, 130, 0.4);
  pointer-events: none;
}

.step-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.8rem;
  font-weight: 700;
  color: rgba(92, 61, 30, 0.09);
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.step-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 18px;
  filter: sepia(0.5) brightness(0.88);
}

.step-card h3 {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brown-dark);
  margin-bottom: 14px;
  line-height: 1.4;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.step-arrow {
  flex-shrink: 0;
  width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 72px;
  color: var(--gold-light);
  font-size: 1.3rem;
  opacity: 0.6;
  letter-spacing: -0.05em;
}

/* ---- PRICING ---- */
.pricing-section {
  padding: 100px 0;
  background: var(--bg);
  position: relative;
}

.pricing-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

.pricing-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  padding: 68px 60px;
  text-align: center;
  position: relative;
}

.pricing-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(192, 168, 130, 0.45);
  pointer-events: none;
}

.pricing-badge {
  display: inline-block;
  background: var(--brown-warm);
  color: var(--white-warm);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 5px 22px;
  margin-bottom: 28px;
  transform: rotate(-1deg);
  position: relative;
  z-index: 1;
}

.pricing-card h2 {
  font-family: 'Cormorant Garamond', 'Noto Serif KR', serif;
  font-size: 1.55rem;
  color: var(--brown-dark);
  margin-bottom: 20px;
  font-weight: 600;
}

.price-amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--brown-mid);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.price-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  font-style: italic;
}

.includes-list {
  list-style: none;
  text-align: left;
  margin-bottom: 44px;
}

.includes-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 11px 0;
  border-bottom: 1px solid rgba(192, 168, 130, 0.22);
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.5;
}

.includes-list li::before {
  content: '✓';
  color: var(--gold);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ---- QUOTE SECTION ---- */
.quote-section {
  background: var(--brown-mid);
  padding: 100px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.quote-section::before {
  content: '\201C';
  font-family: 'Cormorant Garamond', serif;
  font-size: 18rem;
  color: rgba(245, 237, 216, 0.06);
  position: absolute;
  top: -60px;
  left: 40px;
  line-height: 1;
  pointer-events: none;
}

.big-quote {
  font-family: 'Cormorant Garamond', 'Noto Serif KR', serif;
  font-style: italic;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 300;
  color: var(--bg-cream);
  line-height: 1.8;
  max-width: 660px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  letter-spacing: 0.01em;
}

/* ---- REFUND NOTE ---- */
.refund-note {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.55;
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 52px 0;
  text-align: center;
}

.footer-brand {
  font-family: 'Cormorant Garamond', 'Noto Serif KR', serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--brown-dark);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 4px;
}

.footer-divider {
  color: var(--border);
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  margin: 20px 0;
}

/* ================================================================
   ORDER PAGE STYLES
   ================================================================ */

.order-hero {
  padding: 72px 0 52px;
  text-align: center;
  background: var(--bg);
}

.order-hero .section-title {
  margin-bottom: 12px;
}

.order-intro {
  font-size: 0.975rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.8;
}

.order-section {
  background: var(--bg-cream);
  padding: 20px 0 96px;
  position: relative;
}

.order-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

.order-form {
  max-width: 700px;
  margin: 0 auto;
  padding-top: 56px;
}

/* Form Groups */
.form-group {
  margin-bottom: 52px;
}

.form-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  font-family: 'Noto Serif KR', serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--brown-dark);
  cursor: pointer;
}

.label-num {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.82rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  font-weight: 400;
}

.label-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: auto;
  font-style: italic;
}

/* Inputs */
.form-input,
.form-textarea {
  width: 100%;
  background: var(--bg-light);
  border: 1.5px solid var(--border-light);
  color: var(--brown-dark);
  font-family: 'Noto Serif KR', serif;
  font-size: 0.975rem;
  padding: 14px 18px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--brown-mid);
  background: var(--white-warm);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(107, 78, 56, 0.4);
  font-style: italic;
}

.form-input + .form-input {
  margin-top: 10px;
}

.form-textarea {
  resize: vertical;
  line-height: 1.9;
  min-height: 260px;
}

.textarea-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Photo Upload */
.photo-upload-zone {
  border: 2px dashed var(--border);
  background: rgba(237, 226, 192, 0.3);
  padding: 52px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}

.photo-upload-zone:hover,
.photo-upload-zone.dragover {
  border-color: var(--brown-mid);
  background: rgba(237, 226, 192, 0.6);
}

.photo-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}

.upload-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 14px;
  filter: sepia(0.55) brightness(0.88);
}

.upload-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.upload-sub {
  font-size: 0.78rem;
  color: rgba(107, 78, 56, 0.5);
  font-style: italic;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.preview-item {
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.18) brightness(0.95);
}

.photo-count-note {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
}

/* Timing Options */
.timing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.timing-option {
  display: block;
  cursor: pointer;
}

.timing-option input[type="radio"] {
  display: none;
}

.timing-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px 12px;
  border: 1.5px solid var(--border-light);
  background: rgba(250, 247, 239, 0.5);
  transition: all 0.2s;
  position: relative;
}

.timing-option:hover .timing-face {
  border-color: var(--brown-warm);
  background: rgba(237, 226, 192, 0.7);
}

.timing-option input:checked + .timing-face {
  background: var(--brown-mid);
  border-color: var(--brown-mid);
}

.timing-option input:checked + .timing-face .timing-year,
.timing-option input:checked + .timing-face .timing-label {
  color: var(--white-warm);
}

.timing-year {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--brown-mid);
  line-height: 1;
  margin-bottom: 5px;
  transition: color 0.2s;
}

.timing-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

/* Order Summary */
.order-summary {
  background: var(--bg-light);
  border: 1px solid var(--border);
  padding: 28px 32px;
  margin-bottom: 20px;
  position: relative;
}

.order-summary::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(192, 168, 130, 0.38);
  pointer-events: none;
}

.summary-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(192, 168, 130, 0.2);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.summary-row:last-child {
  border-bottom: none;
  border-top: 1.5px solid var(--border);
  margin-top: 6px;
  padding-top: 16px;
}

.summary-row.total {
  font-family: 'Noto Serif KR', serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brown-dark);
}

/* Payment Button */
.payment-btn {
  width: 100%;
  background: var(--brown-mid);
  color: var(--white-warm);
  font-family: 'Noto Serif KR', serif;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  padding: 20px;
  border: 2px solid var(--brown-mid);
  cursor: pointer;
  transition: background 0.22s, border-color 0.22s, transform 0.15s;
  position: relative;
  font-weight: 600;
}

.payment-btn::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.payment-btn:hover {
  background: var(--brown-dark);
  border-color: var(--brown-dark);
  transform: translateY(-1px);
}

.form-notice {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
  line-height: 1.7;
  font-style: italic;
}

/* Form separator */
.form-sep {
  border: none;
  border-top: 1px solid rgba(192, 168, 130, 0.3);
  margin: 60px 0;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 820px) {
  .hero-postmark { display: none; }

  .steps-row {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .step-card { width: 100%; max-width: 480px; }

  .step-arrow {
    transform: rotate(90deg);
    padding-top: 0;
    height: 48px;
    width: auto;
  }

  .pricing-card { padding: 52px 32px; }
  .timing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* HOW IT WORKS — 세 카드가 한 화면에 들어오도록 컴팩트하게 */
  .how-section {
    padding: 24px 0 20px;
  }

  .how-section .section-eyebrow {
    margin-bottom: 4px;
  }

  .how-section .section-title {
    font-size: 1.4rem;
    margin-bottom: 6px;
  }

  .how-section .ornament {
    margin-bottom: 12px;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
  }

  .step-card {
    padding: 10px 16px;
    max-width: 100%;
  }

  .step-card::after {
    inset: 4px;
  }

  .step-num {
    font-size: 1.6rem;
    margin-bottom: 2px;
  }

  .step-icon {
    font-size: 1.3rem;
    margin-bottom: 4px;
  }

  .step-card h3 {
    font-size: 0.82rem;
    margin-bottom: 3px;
  }

  .step-card p {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  /* <br> 숨겨서 단락이 자연스럽게 흐르도록 → 4줄 → 약 2줄로 높이 절약 */
  .step-card p br {
    display: none;
  }

  .step-arrow {
    height: 14px;
  }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .hero-title { font-size: clamp(3.2rem, 14vw, 5rem); }
  .pricing-card { padding: 40px 20px; }
  .price-amount { font-size: 3rem; }
  .order-form { padding-top: 36px; }
  .timing-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .order-summary { padding: 24px 20px; }
}

/* ---- SCROLL FADE-IN ---- */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1.05s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1.05s cubic-bezier(0.22, 1, 0.36, 1);
}
.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- TYPING ANIMATION ---- */
.typing-cursor {
  display: inline-block;
  margin-left: 3px;
  font-weight: 300;
  color: var(--brown-light);
  opacity: 1;
  transition: opacity 1s ease;
  animation: typing-blink 0.85s step-end infinite;
}

.typing-cursor--hide {
  opacity: 0;
  animation: none;
}

@keyframes typing-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
