/* ==========================================================================
   무연 MUYEON — base.css
   Design tokens, reset, typography, form + photo primitives.
   Palette: charcoal ink / warm clay / bronze accent — dark editorial dining.
   ========================================================================== */

:root {
  /* palette */
  --ink: #0c0b0a;
  --ink-2: #131110;
  --ink-3: #1c1917;
  --ink-4: #26221f;
  --line: #322c28;
  --clay: #e8ded2;
  --clay-2: #c4b7a7;
  --clay-3: #948779;
  --bronze: #b08a52;
  --bronze-2: #cda86c;
  --paper: #f6f2ec;

  /* type */
  --ff: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", system-ui, "Malgun Gothic", sans-serif;
  --ff-display: "Cormorant Garamond", "Times New Roman", var(--ff), serif;

  --fs-hero: clamp(2.9rem, 8vw, 7rem);
  --fs-h2: clamp(1.9rem, 4.4vw, 3.5rem);
  --fs-h3: clamp(1.15rem, 1.9vw, 1.55rem);
  --fs-lead: clamp(1rem, 1.45vw, 1.24rem);
  --fs-body: clamp(0.95rem, 1vw, 1.04rem);
  --fs-sm: 0.875rem;
  --fs-xs: 0.76rem;

  /* space */
  --gut: clamp(1.25rem, 4vw, 3.25rem);
  /* Section rhythm. The vw term is what a wide screen actually lands on, so it
     is kept modest: two adjacent sections stack their padding, and 9rem each
     read as a dead band on a 2300px display. */
  --sec: clamp(3.5rem, 4.5vw, 5.5rem);
  --max: 1300px;

  --r-s: 3px;
  --r-m: 8px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html.is-locked {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--clay);
  font-family: var(--ff);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.78;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  word-break: keep-all;
}

img,
svg,
picture {
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -0.03em;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* ---- Focus ring (WCAG 2.2 — visible on every interactive element) ------- */

:focus-visible {
  outline: 2px solid var(--bronze-2);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: var(--gut);
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--paper);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip:focus {
  top: 1rem;
}

/* ---- Layout primitives -------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.section {
  padding-block: var(--sec);
}

.eyebrow {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--bronze-2);
}

.display {
  font-family: var(--ff-display);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.85;
  color: var(--clay-2);
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ---- Photo primitives --------------------------------------------------- */

/* Fixed-ratio frame so an image can never cause layout shift. */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--ink-3);
}

.frame > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame--wide {
  aspect-ratio: 16 / 9;
}

.frame--land {
  aspect-ratio: 3 / 2;
}

.frame--port {
  aspect-ratio: 3 / 4;
}

.frame--sq {
  aspect-ratio: 1 / 1;
}

/* Warm duotone-ish grade: unifies photos shot with different light. */
.grade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgb(12 11 10 / 12%) 0%,
    rgb(12 11 10 / 4%) 45%,
    rgb(12 11 10 / 52%) 100%
  );
  pointer-events: none;
}

/* ---- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.9rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition:
    background-color 0.35s var(--ease),
    color 0.35s var(--ease),
    border-color 0.35s var(--ease),
    transform 0.35s var(--ease);
}

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

.btn--solid {
  background: var(--paper);
  color: var(--ink);
}

.btn--solid:hover {
  background: var(--bronze-2);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--clay);
}

.btn--ghost:hover {
  border-color: var(--bronze);
  color: var(--bronze-2);
}

/* ---- Forms -------------------------------------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay-3);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--clay);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  transition:
    border-color 0.25s var(--ease),
    background-color 0.25s var(--ease);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #6d635a;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #463e37;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--bronze);
  background: var(--ink-3);
  outline: none;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field-hint {
  font-size: var(--fs-xs);
  color: var(--clay-3);
}

.field-error {
  font-size: var(--fs-xs);
  color: #e0a4a4;
  min-height: 1.1em;
}

/* ---- Screen-reader only ------------------------------------------------- */

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
