/* 개원노트 — gaewonnote.kr */
:root {
  --gw-cream: #f7f0e1;
  --gw-paper: #fffdf6;
  --gw-paper-2: #f3ecd9;
  --gw-ink: #0f3f39;
  --gw-deep: #082622;
  --gw-green: #1c5a52;
  --gw-coral: #e0664a;
  --gw-gold: #c9a85a;
  --gw-muted: #4f6b65;
  --gw-wood: #3b2a1c;
  --gw-serif: "Gowun Batang", "Noto Serif KR", serif;
  --gw-sans: "Noto Sans KR", system-ui, -apple-system, "Malgun Gothic", sans-serif;
  --p: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--gw-cream);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--gw-cream);
  color: var(--gw-ink);
  font-family: var(--gw-sans);
  line-height: 1.6;
}
img,
video,
svg {
  display: block;
  max-width: 100%;
}
.gw {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* ───────── header ───────── */
.gw-brand {
  position: fixed;
  z-index: 40;
  top: clamp(0.9rem, 2.6vw, 1.6rem);
  left: clamp(1rem, 4vw, 4rem);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.95rem 0.5rem 0.6rem;
  border-radius: 999px;
  background: rgb(255 253 246 / 0.92);
  box-shadow: 0 8px 24px rgb(8 38 34 / 0.18);
  color: var(--gw-ink);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.gw-brand svg {
  width: 1.15rem;
  height: 1.4rem;
}

/* ───────── first-screen guidance ───────── */
.gw-cue {
  position: fixed;
  z-index: 39;
  left: 50%;
  bottom: clamp(1.4rem, 4vh, 2.6rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.2rem 0.6rem;
  border-radius: 1.2rem;
  background: rgb(15 63 57 / 0.88);
  color: var(--gw-paper);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 10px 26px rgb(8 38 34 / 0.3);
  pointer-events: none;
  transform: translateX(-50%);
  transition:
    transform 0.4s ease,
    visibility 0.4s;
}
.gw-cue[data-gone="true"] {
  transform: translateX(-50%) translateY(220%);
  visibility: hidden;
}
.gw-cue svg {
  width: 1.1rem;
  height: 1.65rem;
  animation: gw-nudge 1.5s ease-in-out infinite;
}
@keyframes gw-nudge {
  0%,
  100% {
    transform: translateY(-3px);
  }
  50% {
    transform: translateY(5px);
  }
}

/* ───────── journey: the notebook film ───────── */
.jr {
  position: relative;
  isolation: isolate;
  background: var(--gw-wood);
}
.jr-stage {
  position: sticky;
  top: 0;
  z-index: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--gw-wood);
}
.jr-media,
.jr-media picture,
.jr-poster,
.jr-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.jr-poster,
.jr-video {
  object-fit: cover;
  object-position: 50% 50%;
}
.jr-video {
  opacity: 0;
}
.jr-video[data-ready="true"] {
  opacity: 1;
}
.jr-progress {
  position: absolute;
  z-index: 5;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: rgb(255 253 246 / 0.25);
  pointer-events: none;
}
.jr-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--gw-coral);
  transform: scaleX(var(--p));
  transform-origin: left center;
}
.jr-route {
  position: absolute;
  z-index: 6;
  top: clamp(0.9rem, 2.6vw, 1.6rem);
  right: clamp(1rem, 4vw, 4rem);
  display: flex;
  gap: 0.15rem;
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
  background: rgb(255 253 246 / 0.92);
  box-shadow: 0 8px 24px rgb(8 38 34 / 0.18);
}
.jr-route button {
  min-height: 2.6rem;
  padding: 0.5rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--gw-muted);
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
}
.jr-route button:hover,
.jr-route button[aria-current="step"] {
  color: var(--gw-ink);
}
.jr-route button[aria-current="step"] {
  text-decoration: underline;
  text-decoration-color: var(--gw-coral);
  text-decoration-thickness: 0.15em;
  text-underline-offset: 0.3em;
}
.jr-route button:focus-visible {
  outline: 3px solid var(--gw-coral);
  outline-offset: 2px;
}
.jr-story {
  position: relative;
  z-index: 3;
  margin-top: -100vh;
  margin-top: -100dvh;
  pointer-events: none;
}
.jr-chapter {
  position: relative;
  min-height: 150vh;
}
.jr-pin {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(5rem, 9vw, 8rem) clamp(1.25rem, 6vw, 6rem);
}
.jr-chapter[data-align="right"] .jr-pin {
  justify-content: flex-end;
}

/* a note sheet taped over the film, swaying */
.note {
  position: relative;
  width: min(31rem, 44vw);
  padding: 2.6rem 2.4rem 2.4rem 3.1rem;
  border-radius: 1.1rem;
  background:
    linear-gradient(90deg, transparent 1.7rem, rgb(224 102 74 / 0.45) 1.7rem, rgb(224 102 74 / 0.45) calc(1.7rem + 2px), transparent calc(1.7rem + 2px)),
    repeating-linear-gradient(180deg, transparent 0, transparent 2.35rem, rgb(15 63 57 / 0.09) 2.35rem, rgb(15 63 57 / 0.09) calc(2.35rem + 1px)),
    linear-gradient(180deg, var(--gw-paper), var(--gw-paper-2));
  box-shadow:
    0 2px 0 var(--gw-paper-2),
    0 30px 60px rgb(8 38 34 / 0.34);
  pointer-events: auto;
  transform-origin: 50% -1.2rem;
  animation: gw-sway 6.5s ease-in-out infinite;
}
.jr-chapter[data-align="right"] .note {
  animation-delay: -2.4s;
}
.note::before {
  position: absolute;
  top: -0.85rem;
  left: 50%;
  width: 6.5rem;
  height: 1.7rem;
  background: #dcc88f;
  opacity: 0.92;
  content: "";
  transform: translateX(-50%) rotate(-2.5deg);
  box-shadow: 0 2px 6px rgb(8 38 34 / 0.2);
}
.note-kicker {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--gw-ink);
  color: var(--gw-paper);
  font-size: 0.82rem;
  font-weight: 700;
}
.note-title {
  margin: 0;
  font-family: var(--gw-serif);
  font-size: clamp(1.9rem, 3.3vw, 3rem);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.03em;
}
.note-body {
  margin: 1.2rem 0 0;
  color: var(--gw-muted);
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.85;
}
.note-pen {
  margin: 1.1rem 0 0;
  color: var(--gw-coral);
  font-family: "Nanum Pen Script", var(--gw-serif);
  font-size: clamp(1.7rem, 2.4vw, 2.2rem);
  line-height: 1.2;
  transform: rotate(-2.5deg);
  transform-origin: left center;
}
@keyframes gw-sway {
  0%,
  100% {
    transform: rotate(-1.4deg);
  }
  50% {
    transform: rotate(1.4deg);
  }
}
.gw-first {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem;
  margin-top: 1.5rem;
}
.gw-first__ask {
  display: inline-block;
  padding: 0.8rem 2.3rem 0.8rem 1.3rem;
  background: var(--gw-coral);
  color: var(--gw-paper);
  font-weight: 700;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, calc(100% - 1rem) 50%, 100% 100%, 0 100%);
  transition: padding 0.25s ease;
}
.gw-first__ask:hover {
  padding-right: 2.9rem;
}
.gw-first__more {
  color: var(--gw-ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--gw-coral);
  text-decoration-thickness: 0.16em;
  text-underline-offset: 0.35em;
}

/* ───────── sections ───────── */
.gw-section {
  position: relative;
  z-index: 4;
  padding: clamp(4.5rem, 10vw, 8rem) clamp(1.25rem, 6vw, 6rem);
  scroll-margin-top: 1rem;
}
.gw-wrap {
  max-width: 68rem;
  margin: 0 auto;
}
.gw-grid-56,
.gw-grid-46 {
  display: grid;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.gw-grid-56 {
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}
.gw-grid-46 {
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
}
.gw-grid-center {
  align-items: center;
}
.gw-eyebrow {
  margin: 0 0 0.9rem;
  color: var(--gw-coral);
  font-weight: 700;
  font-size: 0.95rem;
}
.gw-h2 {
  margin: 0;
  font-family: var(--gw-serif);
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.03em;
}
.gw-lead {
  max-width: 40rem;
  margin: 1.2rem 0 0;
  color: var(--gw-muted);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.9;
}
.gw-order,
.gw-faq {
  background:
    repeating-linear-gradient(180deg, transparent 0, transparent 2.9rem, rgb(15 63 57 / 0.07) 2.9rem, rgb(15 63 57 / 0.07) calc(2.9rem + 1px)),
    var(--gw-cream);
}
.gw-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: gw-step;
}
.gw-steps li {
  display: grid;
  grid-template-columns: 2.9rem 1fr;
  align-items: baseline;
  min-height: 2.9rem;
  padding: 0.55rem 0;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  line-height: 1.7;
  counter-increment: gw-step;
}
.gw-steps li::before {
  content: counter(gw-step);
  font-family: var(--gw-serif);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--gw-coral);
}
.gw-steps span {
  color: var(--gw-muted);
}
.gw-fine {
  margin-top: 1.6rem;
  color: var(--gw-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ───────── flip notebook ───────── */
.gw-services {
  background: radial-gradient(circle at 50% 20%, var(--gw-green) 0%, var(--gw-ink) 55%, var(--gw-deep) 100%);
  color: var(--gw-paper);
}
.gw-services .gw-lead {
  color: rgb(255 253 246 / 0.78);
}
.gw-book {
  position: relative;
  width: min(100%, 30rem);
  margin: 0 auto;
  perspective: 1800px;
  transform-origin: 0 50%;
  animation: gw-sway 7.5s ease-in-out infinite;
}
.gw-book__rings {
  position: absolute;
  z-index: 30;
  left: -1.05rem;
  top: 7%;
  bottom: 7%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.gw-book__rings i {
  width: 2.3rem;
  height: 0.62rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #a98a43, var(--gw-gold) 45%, #f0dca0 60%, var(--gw-gold));
  box-shadow: 0 3px 5px rgb(0 0 0 / 0.3);
}
.gw-book__stack {
  position: relative;
  aspect-ratio: 4 / 5;
  transform-style: preserve-3d;
}
.gw-page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 2.2rem 2rem 1.8rem 3.4rem;
  border-radius: 1.1rem;
  color: var(--gw-ink);
  background:
    linear-gradient(90deg, transparent 2.4rem, rgb(224 102 74 / 0.45) 2.4rem, rgb(224 102 74 / 0.45) calc(2.4rem + 2px), transparent calc(2.4rem + 2px)),
    repeating-linear-gradient(180deg, transparent 0, transparent 2.3rem, rgb(15 63 57 / 0.09) 2.3rem, rgb(15 63 57 / 0.09) calc(2.3rem + 1px)),
    linear-gradient(180deg, var(--gw-paper), var(--gw-paper-2));
  box-shadow: 0 24px 50px rgb(0 0 0 / 0.35);
  transform-origin: 0 50%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition:
    transform 0.95s cubic-bezier(0.45, 0.05, 0.2, 1),
    box-shadow 0.95s ease;
}
.gw-page[data-flipped="true"] {
  transform: rotateY(-178deg);
  box-shadow: 0 0 0 rgb(0 0 0 / 0);
  pointer-events: none;
}
.gw-page__no {
  font-family: var(--gw-serif);
  font-weight: 700;
  color: var(--gw-coral);
}
.gw-page h3 {
  margin: 0.5rem 0 0;
  font-family: var(--gw-serif);
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.03em;
}
.gw-page p {
  margin: 0.95rem 0 0;
  color: var(--gw-muted);
  line-height: 1.85;
}
.gw-page ul {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.gw-page li {
  position: relative;
  padding: 0.3rem 0 0.3rem 1.35rem;
  line-height: 1.7;
}
.gw-page li::before {
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--gw-coral);
  content: "";
}
.gw-book__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.6rem;
}
.gw-turn {
  min-height: 2.9rem;
  padding: 0.6rem 1.25rem;
  border: 0;
  border-radius: 0.5rem 0.5rem 1.4rem 0.5rem;
  background: var(--gw-paper);
  color: var(--gw-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--gw-gold);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.gw-turn:hover:not(:disabled) {
  transform: translateY(2px) rotate(-1deg);
  box-shadow: 0 4px 0 var(--gw-gold);
}
.gw-turn:disabled {
  opacity: 0.45;
  cursor: default;
}
.gw-book__count {
  min-width: 3.5rem;
  text-align: center;
  font-family: var(--gw-serif);
  font-weight: 700;
}

/* ───────── videos ───────── */
.gw-videos__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 2.4rem;
}
.gw-clip {
  display: block;
  padding: 1.6rem 1.6rem 1.5rem;
  border-radius: 1.1rem;
  background: var(--gw-paper);
  color: var(--gw-ink);
  text-decoration: none;
  box-shadow: 0 14px 30px rgb(8 38 34 / 0.12);
  transition: transform 0.25s ease;
}
.gw-clip:nth-child(odd) {
  transform: rotate(-0.8deg);
}
.gw-clip:nth-child(even) {
  transform: rotate(0.9deg);
}
.gw-clip:hover {
  transform: rotate(0deg) translateY(-4px);
}
.gw-clip small {
  color: var(--gw-coral);
  font-weight: 700;
}
.gw-clip strong {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--gw-serif);
  font-size: 1.35rem;
  line-height: 1.45;
}
.gw-clip em {
  display: block;
  margin-top: 0.7rem;
  color: var(--gw-muted);
  font-style: normal;
  line-height: 1.7;
}
.gw-ribbon {
  display: inline-block;
  margin-top: 2.2rem;
  padding: 0.85rem 2.4rem 0.85rem 1.3rem;
  background: var(--gw-coral);
  color: var(--gw-paper);
  font-weight: 700;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, calc(100% - 1.1rem) 50%, 100% 100%, 0 100%);
  transition: padding 0.25s ease;
}
.gw-ribbon:hover {
  padding-right: 3.1rem;
}

/* ───────── faq ───────── */
.gw-faq__list {
  max-width: 48rem;
  margin-top: 2.2rem;
}
.gw-faq__item {
  border-bottom: 2px solid rgb(15 63 57 / 0.16);
}
.gw-faq__item summary {
  position: relative;
  padding: 1.15rem 2.2rem 1.15rem 0;
  font-family: var(--gw-serif);
  font-weight: 700;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}
.gw-faq__item summary::-webkit-details-marker {
  display: none;
}
.gw-faq__item summary::after {
  position: absolute;
  right: 0.2rem;
  top: 1.05rem;
  color: var(--gw-coral);
  font-family: var(--gw-sans);
  font-size: 1.5rem;
  line-height: 1;
  content: "+";
}
.gw-faq__item[open] summary::after {
  content: "–";
}
.gw-faq__item p {
  margin: 0 0 1.3rem;
  color: var(--gw-muted);
  line-height: 1.9;
}

/* ───────── inquiry ───────── */
.gw-ask {
  background: var(--gw-paper-2);
}
.gw-form {
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border-radius: 1.1rem;
  background: var(--gw-paper);
  box-shadow: 0 18px 40px rgb(8 38 34 / 0.12);
}
.gw-field {
  display: block;
  margin-bottom: 1.15rem;
}
.gw-field > span,
.gw-legend {
  display: block;
  margin-bottom: 0.4rem;
  padding: 0;
  font-weight: 700;
  font-size: 0.95rem;
}
.gw-field input,
.gw-field textarea {
  width: 100%;
  padding: 0.6rem 0.2rem;
  border: 0;
  border-bottom: 2px solid rgb(15 63 57 / 0.28);
  border-radius: 0;
  background: transparent;
  color: var(--gw-ink);
  font: inherit;
  font-size: 1rem;
}
.gw-field textarea {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.8;
}
.gw-field input:focus,
.gw-field textarea:focus {
  outline: 0;
  border-bottom-color: var(--gw-coral);
}
.gw-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.15rem;
  padding: 0;
  border: 0;
}
.gw-choices legend {
  width: 100%;
}
.gw-choice {
  position: relative;
}
.gw-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.gw-choice span {
  display: inline-block;
  padding: 0.5rem 0.95rem;
  border: 2px solid rgb(15 63 57 / 0.22);
  border-radius: 999px;
  cursor: pointer;
}
.gw-choice input:checked + span {
  border-color: var(--gw-ink);
  background: var(--gw-ink);
  color: var(--gw-paper);
}
.gw-choice input:focus-visible + span {
  outline: 3px solid var(--gw-coral);
  outline-offset: 2px;
}
.gw-consent {
  margin: 0.4rem 0 1.3rem;
  color: var(--gw-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}
.gw-send {
  min-height: 3.2rem;
  padding: 0.8rem 2rem;
  border: 2px solid var(--gw-ink);
  border-radius: 0.4rem;
  background: var(--gw-ink);
  color: var(--gw-paper);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.2s ease;
}
.gw-send:hover {
  background: var(--gw-green);
}
.gw-send:active {
  transform: scale(0.96) rotate(-1deg);
}
/* secondary: a dashed "copy" slip */
.gw-copy {
  min-height: 3.2rem;
  margin-left: 0.5rem;
  padding: 0.8rem 1.2rem;
  border: 2px dashed rgb(15 63 57 / 0.4);
  border-radius: 0.4rem;
  background: transparent;
  color: var(--gw-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.gw-copy:hover {
  border-style: solid;
}
.gw-status {
  margin: 1rem 0 0;
  font-weight: 700;
  line-height: 1.7;
}
.gw-status[data-kind="error"] {
  color: var(--gw-coral);
}
.gw-info {
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--gw-muted);
  line-height: 2;
}
.gw-info b {
  color: var(--gw-ink);
}
.gw-info a {
  color: var(--gw-ink);
  text-decoration: underline;
  text-decoration-color: var(--gw-coral);
  text-underline-offset: 0.25em;
}

/* ───────── footer ───────── */
.gw-foot {
  position: relative;
  z-index: 4;
  padding: 2.4rem clamp(1.25rem, 6vw, 6rem) 3rem;
  background: var(--gw-deep);
  color: rgb(255 253 246 / 0.72);
  font-size: 0.92rem;
  line-height: 1.9;
}
.gw-foot strong,
.gw-foot b {
  color: var(--gw-paper);
}
.gw-biz {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgb(255 253 246 / 0.18);
  font-style: normal;
}
.gw-biz a {
  color: var(--gw-paper);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gw-coral);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .jr-route {
    top: auto;
    right: auto;
    left: 50%;
    bottom: max(0.8rem, env(safe-area-inset-bottom));
    max-width: calc(100vw - 1.5rem);
    transform: translateX(-50%);
  }
  .jr-route button {
    padding: 0.5rem 0.7rem;
    white-space: nowrap;
  }
  .jr-pin,
  .jr-chapter[data-align="right"] .jr-pin {
    align-items: flex-end;
    justify-content: flex-start;
    padding: 6.5rem 1.25rem calc(5.5rem + env(safe-area-inset-bottom));
  }
  .note {
    width: 100%;
    padding: 2.1rem 1.5rem 1.7rem 2.3rem;
  }
  .gw-cue {
    bottom: calc(4.6rem + env(safe-area-inset-bottom));
    font-size: 0.88rem;
  }
  .gw-grid-56,
  .gw-grid-46,
  .gw-videos__list {
    grid-template-columns: 1fr;
  }
  .gw-copy {
    margin: 0.6rem 0 0;
  }
  .gw-foot {
    padding-bottom: 5.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .note,
  .gw-book,
  .gw-cue svg {
    animation: none;
  }
  .gw-page {
    transition: none;
  }
  .jr-video {
    display: none;
  }
}
