/* ==========================================================================
   토연 TOYEON — base.css
   Tokens, reset, typography, layout + photo primitives. Shared by all pages.
   Type is Pretendard only; weight and letter-spacing carry the editorial tone
   instead of a second display face.
   ========================================================================== */

:root {
  /* palette — gallery white / raw clay / celadon accent */
  --paper: #f7f5f1;
  --paper-2: #efebe4;
  --paper-3: #e4dfd6;
  --line: #d9d3c8;
  --ink: #1c1a17;
  --ink-2: #38332d;
  --ink-3: #6b645a;
  --ink-4: #948c80;
  --clay: #a87d5e;
  --celadon: #6f8a7f;

  --ff: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", system-ui, "Malgun Gothic", sans-serif;

  --fs-hero: clamp(2.3rem, 5.6vw, 4.75rem);
  --fs-h2: clamp(1.65rem, 3.2vw, 2.6rem);
  --fs-h3: clamp(1.05rem, 1.6vw, 1.32rem);
  --fs-lead: clamp(1rem, 1.3vw, 1.18rem);
  --fs-body: clamp(0.94rem, 1vw, 1.02rem);
  --fs-sm: 0.875rem;
  --fs-xs: 0.76rem;

  --gut: clamp(1.25rem, 4vw, 3rem);
  --sec: clamp(3.25rem, 4.2vw, 5rem);
  --max: 1240px;

  --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(--paper);
  color: var(--ink-2);
  font-family: var(--ff);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.78;
  letter-spacing: -0.008em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  word-break: keep-all;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.26;
  letter-spacing: -0.035em;
}

p,
figure {
  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 + skip link -------------------------------------------------- */

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

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

.skip:focus {
  top: 1rem;
}

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

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

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

.wrap--wide {
  max-width: 1560px;
}

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

.eyebrow {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--clay);
}

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

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

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

/* Fixed-ratio frame: an image can never shift the layout. */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--paper-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--sq {
  aspect-ratio: 1 / 1;
}

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

.frame--tall {
  aspect-ratio: 4 / 5;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 1.75rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  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(--ink);
  color: var(--paper);
}

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

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

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

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

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

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

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

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-4);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--ink-4);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--celadon);
  outline: none;
}

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

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

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