/* =========================================================
   Precision Food Lab — Foundation Tokens
   Colors + Type (base + semantic)
   ========================================================= */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.min.css');

@font-face {
  font-family: 'NanumBarunGothic';
  src: url('fonts/NanumBarunGothicLight.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- Brand Core ---------- */
  --pfl-wine:       #A22141;  /* primary */
  --pfl-wine-hover: #8B1B37;
  --pfl-wine-10:    rgba(162, 33, 65, 0.10);
  --pfl-wine-15:    rgba(162, 33, 65, 0.15);
  --pfl-wine-45:    rgba(162, 33, 65, 0.45);

  --pfl-ink:        #2B2B2B;  /* near-black body */
  --pfl-ink-80:     #4A4A4A;
  --pfl-ink-05:     rgba(43, 43, 43, 0.05);
  --pfl-ink-10:     rgba(43, 43, 43, 0.10);
  --pfl-ink-20:     rgba(43, 43, 43, 0.20);

  --pfl-cream:      #EDE8E2;  /* warm off-white, reverse-out on ink */
  --pfl-cream-50:   #F5F1EC;
  --pfl-canvas:     #FAFAF8;  /* page background */

  /* ---------- Accent Family ---------- */
  --pfl-mauve:      #9C6E82;
  --pfl-teal:       #1A6B7C;
  --pfl-moss:       #555638;
  --pfl-sand:       #A09070;
  --pfl-slate:      #6B7075;

  /* ---------- Semantic Foreground / Background ---------- */
  --fg-1:           var(--pfl-ink);      /* primary text */
  --fg-2:           var(--pfl-ink-80);   /* body copy */
  --fg-3:           var(--pfl-slate);    /* supporting / meta */
  --fg-accent:      var(--pfl-wine);     /* emphasis */
  --fg-reverse:     var(--pfl-cream);    /* on dark surfaces */

  --bg-canvas:      var(--pfl-canvas);
  --bg-surface:     #FFFFFF;             /* cards */
  --bg-cream:       var(--pfl-cream-50); /* alt sections */
  --bg-ink:         var(--pfl-ink);      /* reverse surface */

  --border-hair:    rgba(160, 144, 112, 0.25);  /* sand/25 — default card hairline */
  --border-soft:    rgba(160, 144, 112, 0.40);
  --border-ink:     rgba(43, 43, 43, 0.20);

  /* ---------- Typography — Family ---------- */
  --font-sans: 'Pretendard', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
               'Apple SD Gothic Neo', sans-serif;
  --font-kr-light: 'NanumBarunGothic', 'Pretendard', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  /* ---------- Type Scale (base 17px) ---------- */
  --fs-xs:    0.8125rem;  /* 13px  — meta, eyebrows */
  --fs-sm:    0.9375rem;  /* 15px  — tags, captions */
  --fs-base:  1.0625rem;  /* 17px  — body */
  --fs-lg:    1.125rem;   /* 18px  — lead */
  --fs-xl:    1.25rem;    /* 20px  */
  --fs-2xl:   1.5rem;     /* 24px  */
  --fs-3xl:   1.875rem;   /* 30px  — h3 */
  --fs-4xl:   2.25rem;    /* 36px  — h2 */
  --fs-5xl:   3rem;       /* 48px  */
  --fs-6xl:   3.75rem;    /* 60px  — h1 */
  --fs-7xl:   4.5rem;     /* 72px  — hero */

  /* ---------- Weights ---------- */
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-black:    900;

  /* ---------- Leading ---------- */
  --lh-tight:   0.98;   /* display */
  --lh-snug:    1.15;
  --lh-normal:  1.5;
  --lh-relaxed: 1.7;    /* body */

  /* ---------- Tracking ---------- */
  --ls-tightest: -0.04em;  /* display */
  --ls-tight:    -0.01em;  /* button / ui */
  --ls-normal:   0;
  --ls-wide:     0.2em;    /* eyebrow all-caps */

  /* ---------- Radius ---------- */
  --radius-sm:   0.5rem;   /*  8px */
  --radius-md:   0.75rem;  /* 12px — tags, pills */
  --radius-lg:   1rem;     /* 16px — form inputs, small chips */
  --radius-xl:   1.25rem;  /* 20px */
  --radius-2xl:  1.5rem;   /* 24px — cards */
  --radius-3xl:  1.5rem;   /* 24px (alias) */
  --radius-pill: 9999px;   /* buttons, nav pills */

  /* ---------- Spacing (4px grid) ---------- */
  --sp-1:  0.25rem;   /*  4 */
  --sp-2:  0.5rem;    /*  8 */
  --sp-3:  0.75rem;   /* 12 */
  --sp-4:  1rem;      /* 16 */
  --sp-5:  1.25rem;   /* 20 */
  --sp-6:  1.5rem;    /* 24 */
  --sp-8:  2rem;      /* 32 */
  --sp-10: 2.5rem;    /* 40 */
  --sp-12: 3rem;      /* 48 */
  --sp-14: 3.5rem;    /* 56 */
  --sp-16: 4rem;      /* 64 */
  --sp-20: 5rem;      /* 80 */
  --sp-24: 6rem;      /* 96 */

  /* ---------- Shadows ---------- */
  --shadow-card:   0 10px 30px -14px rgba(43, 43, 43, 0.18);
  --shadow-hover:  0 20px 40px -18px rgba(43, 43, 43, 0.28);
  --shadow-wine:   0 10px 30px -10px rgba(162, 33, 65, 0.45);
  --shadow-deep:   0 30px 60px -25px rgba(43, 43, 43, 0.35);

  /* ---------- Motion ---------- */
  --ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:  200ms;
  --dur-base:  350ms;
  --dur-slow:  700ms;
}

/* =========================================================
   Base Reset
   ========================================================= */
html { scroll-behavior: smooth; }

/* 모바일 가로 오버플로우 안전장치 — 넘치는 요소가 있어도 body가 옆으로 밀리지 않게.
   overflow-x: clip은 스크롤 컨테이너를 만들지 않아 position: sticky를 깨지 않는다(overflow: hidden과 다름). */
html { overflow-x: clip; }

/* 메뉴바 '오늘의 명언' 슬롯 (로고와 메뉴 사이, 데스크톱 전용) — daily-quote.js가 채운다.
   레이아웃은 여기서 처리하고, 표시/숨김은 HTML의 hidden lg:flex(Tailwind)로 제어. */
#daily-quote { flex: 1 1 auto; min-width: 0; padding: 0 20px; }
#daily-quote .dq-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 0.8125rem;
  font-style: italic;
  color: #6B7075;
  letter-spacing: -0.01em;
}
#daily-quote .dq-author { font-style: normal; opacity: 0.75; margin-left: 2px; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--fg-1);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* word-break utility used pervasively across PFL site */
.break-keep { word-break: keep-all; }

/* =========================================================
   Semantic Typography
   ========================================================= */

.pfl-eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--pfl-slate);
}

.pfl-eyebrow--wine { color: var(--pfl-wine); }

.pfl-display,
h1.pfl {
  font-size: clamp(2.5rem, 6vw, var(--fs-7xl));
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-tightest);
  line-height: var(--lh-tight);
  color: var(--fg-1);
}

.pfl-h1 {
  font-size: clamp(2.25rem, 5vw, var(--fs-6xl));
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-tightest);
  line-height: var(--lh-tight);
}

.pfl-h2 {
  font-size: clamp(1.875rem, 3.6vw, var(--fs-5xl));
  font-weight: var(--fw-black);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.pfl-h3 {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.pfl-h4 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: 1.3;
}

.pfl-lead {
  font-size: var(--fs-lg);
  color: var(--fg-2);
  line-height: var(--lh-relaxed);
}

.pfl-p,
p.pfl {
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--fg-2);
}

.pfl-small {
  font-size: var(--fs-sm);
  line-height: 1.65;
  color: var(--fg-2);
}

.pfl-meta {
  font-size: var(--fs-xs);
  color: var(--fg-3);
  line-height: 1.55;
}

.pfl-mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Emphasis wine accent span used inside display headlines */
.pfl-accent { color: var(--pfl-wine); }

/* Long-form Korean body / pull-quote using NanumBarunGothic Light */
.pfl-quote {
  font-family: var(--font-kr-light);
  font-weight: 300;
  font-size: var(--fs-xl);
  line-height: 1.8;
  color: var(--fg-2);
  letter-spacing: -0.01em;
  word-break: keep-all;
}
