/* ==========================================================================
   DOORLIT — shared foundation
   tokens · reset · layout · header · buttons · forms · modal · footer
   ========================================================================== */

:root {
  --paper: #f7f4ed;
  --paper-soft: #efeade;
  --ink: #17170f;
  --ink-70: rgba(23, 23, 15, 0.7);
  --ink-55: rgba(23, 23, 15, 0.55);
  --ink-35: rgba(23, 23, 15, 0.35);
  --line: rgba(23, 23, 15, 0.13);
  --line-soft: rgba(23, 23, 15, 0.07);
  --clay: #b4593a;
  --clay-soft: #e7d3c8;
  --olive: #38453a;
  --sand: #e5dbca;
  --white: #ffffff;

  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif;
  --serif: "Noto Serif KR", "Nanum Myeongjo", Batang, "바탕", "Times New Roman", serif;

  --header-h: 76px;
  --radius: 3px;
  --radius-lg: 14px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-soft: 0 24px 60px -30px rgba(23, 23, 15, 0.35);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

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

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

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol {
  margin: 0;
}

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

::selection {
  background: var(--ink);
  color: var(--paper);
}

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

/* ---------- layout ---------- */

.wrap {
  width: min(1180px, 100% - 64px);
  margin-inline: auto;
}

.wrap-narrow {
  width: min(880px, 100% - 64px);
  margin-inline: auto;
}

.section {
  padding: clamp(72px, 9vw, 132px) 0;
}

.section-tight {
  padding: clamp(56px, 6vw, 88px) 0;
}

.section-alt {
  background: var(--paper-soft);
}

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

/* ---------- type ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-55);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.eyebrow-num {
  font-variant-numeric: tabular-nums;
}

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3.9vw, 48px);
  line-height: 1.38;
  letter-spacing: -0.025em;
  margin-top: 20px;
}

.section-title em {
  font-style: normal;
  color: var(--clay);
}

.section-lead {
  margin-top: 18px;
  max-width: 56ch;
  color: var(--ink-70);
  font-size: 16.5px;
  line-height: 1.8;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-head > div {
  max-width: 720px;
}

.serif {
  font-family: var(--serif);
  letter-spacing: -0.02em;
}

.mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

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

/* ---------- buttons ---------- */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.4s var(--ease), background 0.3s var(--ease),
    color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.4s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -18px rgba(23, 23, 15, 0.6);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.btn-ink {
  --btn-bg: var(--ink);
  --btn-fg: #fbf8f2;
}

.btn-ink:hover {
  --btn-bg: #2c2c22;
}

.btn-line {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line);
}

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

.btn-clay {
  --btn-bg: var(--clay);
  --btn-fg: #fff;
}

.btn-clay:hover {
  --btn-bg: #9e4b2f;
}

.btn-light {
  --btn-bg: #fbf8f2;
  --btn-fg: var(--ink);
}

.btn-outline-light {
  --btn-bg: transparent;
  --btn-fg: #fbf8f2;
  border-color: rgba(251, 248, 242, 0.35);
}

.btn-outline-light:hover {
  border-color: #fbf8f2;
}

.btn-sm {
  padding: 11px 19px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn-kakao {
  --btn-bg: #fee500;
  --btn-fg: #191600;
}

.btn-kakao:hover {
  --btn-bg: #f2da00;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: border-color 0.3s var(--ease), gap 0.3s var(--ease);
}

.link-arrow:hover {
  border-color: var(--ink);
  gap: 16px;
}

.link-arrow svg {
  width: 14px;
  height: 14px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(247, 244, 237, 0.86);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line-soft);
  background: rgba(247, 244, 237, 0.96);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  overflow: hidden;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.brand-text em {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  color: var(--ink-55);
  margin-top: 3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  margin-left: auto;
}

.nav a {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-70);
  padding: 6px 0;
  transition: color 0.25s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.nav a:hover {
  color: var(--ink);
}

.nav a:hover::after {
  transform: scaleX(1);
}

.header-cta {
  flex: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
}

.nav-toggle span {
  position: relative;
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  transition: background 0.2s var(--ease);
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease);
}

.nav-toggle span::before {
  top: -5px;
}

.nav-toggle span::after {
  top: 5px;
}

.nav-open .nav-toggle span {
  background: transparent;
}

.nav-open .nav-toggle span::before {
  transform: translateY(5px) rotate(45deg);
}

.nav-open .nav-toggle span::after {
  transform: translateY(-5px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 96px 32px 40px;
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease),
    visibility 0.35s;
}

.nav-open .mobile-nav {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.mobile-nav a {
  font-family: var(--serif);
  font-size: clamp(24px, 7vw, 32px);
  letter-spacing: -0.02em;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.mobile-nav .mobile-nav-meta {
  margin-top: 28px;
  font-size: 13px;
  color: var(--ink-55);
}

body.nav-open {
  overflow: hidden;
}

/* ---------- sample ribbon ---------- */

.sample-ribbon {
  position: relative;
  z-index: 61;
  background: var(--ink);
  color: #fbf8f2;
  font-size: 12.5px;
  letter-spacing: 0.01em;
}

.sample-ribbon .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  padding-block: 7px;
}

.sample-ribbon strong {
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: rgba(251, 248, 242, 0.65);
}

.sample-ribbon a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid rgba(251, 248, 242, 0.4);
  padding-bottom: 2px;
  white-space: nowrap;
}

.sample-ribbon a:hover {
  border-color: #fbf8f2;
}

/* ---------- reveal ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.js [data-reveal-delay="1"] {
  transition-delay: 0.08s;
}

.js [data-reveal-delay="2"] {
  transition-delay: 0.16s;
}

.js [data-reveal-delay="3"] {
  transition-delay: 0.24s;
}

.js [data-reveal-delay="4"] {
  transition-delay: 0.32s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- forms ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.field-full {
  grid-column: 1 / -1;
}

.field > label:not(.check),
.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink-70);
}

.field .req {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--clay);
  flex: none;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  background: color-mix(in srgb, var(--white) 55%, transparent);
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
  appearance: none;
}

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

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2317170f' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 11px;
  padding-right: 40px;
  cursor: pointer;
}

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

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

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #b23a2a;
}

.field-error {
  font-size: 12px;
  color: #b23a2a;
  min-height: 0;
  display: none;
}

.field.has-error .field-error {
  display: block;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-70);
  cursor: pointer;
  line-height: 1.6;
}

.check input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  border: 1px solid var(--ink-35);
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
  cursor: pointer;
}

.check input::after {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg) scale(0.6);
  opacity: 0;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.check input:checked {
  background: var(--ink);
  border-color: var(--ink);
}

.check input:checked::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

.form-note {
  font-size: 12.5px;
  color: var(--ink-55);
  line-height: 1.7;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  grid-column: 1 / -1;
}

/* dark form panel */

.panel-dark .field > label:not(.check),
.panel-dark .field-label {
  color: rgba(251, 248, 242, 0.72);
}

.panel-dark .field input[type="text"],
.panel-dark .field input[type="tel"],
.panel-dark .field input[type="email"],
.panel-dark .field input[type="date"],
.panel-dark .field select,
.panel-dark .field textarea {
  background: rgba(251, 248, 242, 0.06);
  border-color: rgba(251, 248, 242, 0.18);
  color: #fbf8f2;
}

.panel-dark .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23fbf8f2' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 11px;
}

.panel-dark .field select option {
  color: #17170f;
}

.panel-dark .field input::placeholder,
.panel-dark .field textarea::placeholder {
  color: rgba(251, 248, 242, 0.38);
}

.panel-dark .field input:focus,
.panel-dark .field select:focus,
.panel-dark .field textarea:focus {
  background: rgba(251, 248, 242, 0.1);
  border-color: rgba(251, 248, 242, 0.7);
}

.panel-dark .check {
  color: rgba(251, 248, 242, 0.66);
}

.panel-dark .check input {
  border-color: rgba(251, 248, 242, 0.4);
}

.panel-dark .check input:checked {
  background: #fbf8f2;
  border-color: #fbf8f2;
}

.panel-dark .check input:checked::after {
  border-color: var(--ink);
}

.panel-dark .form-note {
  color: rgba(251, 248, 242, 0.45);
}

.panel-dark .field input[type="date"] {
  color-scheme: dark;
}

/* ---------- modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal[hidden] {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 15, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in 0.3s var(--ease);
}

.modal-card {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 40px 36px 34px;
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.55);
  animation: pop-in 0.42s var(--ease);
}

.modal-card h3 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.modal-card p {
  margin-top: 12px;
  color: var(--ink-70);
  font-size: 14.5px;
}

.modal-summary {
  margin: 22px 0 26px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}

.modal-summary div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}

.modal-summary dt {
  color: var(--ink-55);
  flex: none;
}

.modal-summary dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-55);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.modal-close:hover {
  background: var(--line-soft);
  color: var(--ink);
}

.modal-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  margin-bottom: 20px;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(251, 248, 242, 0.7);
  padding: clamp(48px, 6vw, 76px) 0 32px;
  font-size: 13.5px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(251, 248, 242, 0.14);
}

.footer-brand .brand-mark {
  border-color: rgba(251, 248, 242, 0.5);
  color: #fbf8f2;
}

.footer-brand .brand-text strong {
  color: #fbf8f2;
}

.footer-brand .brand-text em {
  color: rgba(251, 248, 242, 0.5);
}

.footer-tagline {
  margin-top: 18px;
  max-width: 34ch;
  color: rgba(251, 248, 242, 0.55);
  font-size: 13px;
  line-height: 1.8;
}

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
}

.footer-col h4 {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(251, 248, 242, 0.4);
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-col li {
  margin-bottom: 9px;
}

.footer-col a:hover {
  color: #fbf8f2;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  font-size: 12px;
  color: rgba(251, 248, 242, 0.38);
}

.footer-bottom .mono {
  letter-spacing: 0.02em;
}

/* ---------- floating quick bar ---------- */

.float-bar {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.float-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #fbf8f2;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 16px 34px -16px rgba(23, 23, 15, 0.7);
  transition: transform 0.35s var(--ease), background 0.3s var(--ease);
}

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

.float-btn svg {
  width: 16px;
  height: 16px;
}

.float-btn.kakao {
  background: #fee500;
  color: #191600;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .nav {
    display: none;
  }

  .nav-toggle {
    display: grid;
  }

  .header-cta {
    display: none;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 64px;
  }

  body {
    font-size: 15px;
  }

  .wrap,
  .wrap-narrow {
    width: calc(100% - 40px);
  }

  .site-header .brand-text em {
    display: none;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .modal-card {
    padding: 32px 24px 26px;
  }

  .footer-cols {
    gap: 32px;
  }

  .float-bar {
    right: 14px;
    bottom: 14px;
    flex-direction: row;
    left: 14px;
    justify-content: flex-end;
  }

  .float-btn {
    height: 46px;
    padding: 0 16px;
    font-size: 13px;
  }
}
