/* OntoJourney public site stylesheet. Tokens follow design 3.4. No web fonts, no external resources. */

:root {
  --paper: #faf9f6;
  --ink: #1d1c1a;
  --soft: #5d5a54;
  --line: #e3dfd6;
  --accent: #0f5c57;
  --radius: 0.375rem;
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4.5rem;
  --measure: 44rem;
  --wide: 64rem;
  --gutter: var(--s4);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161614;
    --ink: #eceae4;
    --soft: #a8a49b;
    --line: #2e2d29;
    --accent: #7fd1c8;
  }
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.75 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

main:focus {
  outline: none;
}

p {
  margin: 0 0 var(--s4);
  max-width: var(--measure);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

/* Layout container */

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

@media (min-width: 640px) {
  :root {
    --gutter: var(--s5);
  }
}

@media (min-width: 960px) {
  :root {
    --gutter: var(--s6);
  }
}

/* Skip link */

.skip {
  position: absolute;
  top: var(--s2);
  left: max(var(--s4), env(safe-area-inset-left));
  z-index: 30;
  padding: var(--s3) var(--s4);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-300%);
}

.skip:focus,
.skip:focus-visible {
  transform: none;
}

/* Header */

.site-header {
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: 4.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: auto;
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow-wrap: normal;
}

.nav {
  display: flex;
  align-items: center;
}

.menu > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  padding: 0 var(--s3);
  color: var(--ink);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.menu > summary::-webkit-details-marker {
  display: none;
}

.menu > summary::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  margin-top: -0.25rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.menu[open] > summary::after {
  margin-top: 0.25rem;
  transform: rotate(-135deg);
}

@media (prefers-reduced-motion: no-preference) {
  .menu > summary::after {
    transition: transform 0.15s ease;
  }
}

.menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin: 0;
  padding: var(--s2) max(var(--gutter), env(safe-area-inset-right)) var(--s4) max(var(--gutter), env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  list-style: none;
}

.menu-panel li + li {
  border-top: 1px solid var(--line);
}

.menu-panel a {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.menu-panel a:hover {
  color: var(--accent);
}

.menu-wide {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-wide a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.menu-wide a:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (min-width: 960px) {
  .bar {
    gap: var(--s5);
  }

  .menu {
    display: none;
  }

  .menu-wide {
    display: flex;
    gap: var(--s5);
  }
}

/* Buttons (CTA) */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--s5);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--paper);
}

.btn-primary:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
}

.btn-secondary:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.btn-sm {
  min-height: 44px;
  padding: 0 var(--s4);
  font-size: 0.9375rem;
}

.label-long {
  display: none;
}

@media (min-width: 640px) {
  .label-long {
    display: inline;
  }

  .label-short {
    display: none;
  }
}

/* Shared type */

.eyebrow {
  margin: 0 0 var(--s4);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.5;
}

.line {
  display: inline-block;
}

.lede {
  color: var(--soft);
  font-size: 1.125rem;
}

/* Hero */

.hero {
  padding-block: var(--s7);
}

.hero h1 {
  font-size: clamp(2rem, 7vw, 3.1rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.hero .lede {
  margin-top: var(--s5);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s6);
}

.actions .btn {
  flex: 1 1 auto;
}

.hero-note {
  margin: var(--s6) 0 0;
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  color: var(--soft);
}

@media (min-width: 640px) {
  .actions .btn {
    flex: 0 0 auto;
  }
}

@media (min-width: 960px) {
  .hero {
    padding-block: var(--s8);
  }
}

/* Sections */

.section {
  padding-block: var(--s7);
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--s4);
}

@media (min-width: 960px) {
  .section {
    padding-block: var(--s8);
  }
}

.section-head {
  max-width: var(--measure);
  margin-bottom: var(--s6);
}

.section-head h2 {
  font-size: clamp(1.5rem, 4.6vw, 2.125rem);
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.section-head .lede {
  margin: var(--s4) 0 0;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* Step lists (philosophy bridge, method) */

.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s5);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.prose + .steps {
  margin-top: var(--s6);
}

.steps > li {
  padding-top: var(--s4);
  border-top: 2px solid var(--accent);
  counter-increment: step;
}

.step-no::before {
  content: counter(step, decimal-leading-zero);
}

.step-no {
  display: block;
  margin-bottom: var(--s1);
  color: var(--soft);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.term {
  display: block;
  color: var(--accent);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.steps h3 {
  margin-bottom: var(--s2);
  font-size: 1.125rem;
}

.steps p {
  margin: 0;
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s6) var(--s5);
  }
}

@media (min-width: 960px) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Solution cards */

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: var(--s5);
  border: 1px solid var(--line);
}

.kicker {
  margin: 0 0 var(--s2);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.card h3 {
  margin-bottom: var(--s3);
  font-size: 1.1875rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.card p:last-child {
  margin-bottom: 0;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s5);
  }
}

@media (min-width: 960px) {
  .card {
    padding: var(--s6);
  }
}

.notice {
  margin: var(--s5) 0 0;
  padding: var(--s3) var(--s4);
  border-left: 3px solid var(--accent);
  font-size: 0.9375rem;
}

.notice-label {
  margin-right: var(--s2);
  color: var(--accent);
  font-weight: 700;
}

/* Trust principles */

.principles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.principles > li {
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
}

.principles h3 {
  margin-bottom: var(--s2);
  font-size: 1.125rem;
}

.principles p {
  margin: 0;
  color: var(--soft);
}

@media (min-width: 640px) {
  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s6) var(--s5);
  }
}

/* FAQ */

.faq {
  max-width: var(--measure);
}

.faq details {
  border-top: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 44px;
  padding: var(--s4) 0;
  font-weight: 700;
  line-height: 1.6;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  content: "+" / "";
  flex: none;
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
}

.faq details[open] > summary::after {
  content: "\2212";
  content: "\2212" / "";
}

.faq summary:hover {
  color: var(--accent);
}

.faq details p {
  margin: 0;
  padding: 0 0 var(--s5);
  color: var(--soft);
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s5);
}

.contact-box {
  padding-top: var(--s5);
  border-top: 2px solid var(--accent);
}

.contact-label {
  margin: 0 0 var(--s2);
  color: var(--soft);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.contact-value {
  margin: 0 0 var(--s4);
  font-size: 1.25rem;
  font-weight: 700;
}

.contact-value a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  overflow-wrap: anywhere;
}

.contact-hint {
  margin: 0;
  color: var(--soft);
  font-size: 0.9375rem;
}

.placeholder {
  display: inline-block;
  padding: var(--s2) var(--s3);
  border: 1px dashed var(--soft);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
}

.caution {
  padding: var(--s5);
  border: 1px solid var(--line);
}

.caution h3 {
  margin-bottom: var(--s2);
  font-size: 1.0625rem;
}

.caution p {
  margin: 0 0 var(--s3);
  color: var(--soft);
  font-size: 0.9375rem;
}

.caution ul {
  margin: 0;
  padding-left: 1.25em;
}

.caution li + li {
  margin-top: var(--s1);
}

@media (min-width: 960px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: var(--s6);
    align-items: start;
  }
}

/* Simple pages (privacy, not found) */

.page {
  padding-block: var(--s7) var(--s8);
}

.page h1 {
  margin-bottom: var(--s5);
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.page .actions {
  margin-top: var(--s5);
}

.draft-note {
  margin-bottom: var(--s6);
}

.outline {
  max-width: var(--measure);
  padding-top: var(--s5);
  border-top: 1px solid var(--line);
}

.outline h2 {
  margin-bottom: var(--s3);
  font-size: 1.25rem;
}

.outline ol {
  margin: 0;
  padding-left: 1.5em;
}

.outline li {
  padding-block: var(--s1);
}

.outline li strong {
  display: block;
}

.outline li span {
  display: block;
  color: var(--soft);
  font-size: 0.9375rem;
}

/* Footer */

.site-footer {
  padding-top: var(--s6);
  padding-bottom: calc(var(--s6) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.875rem;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s5);
}

.foot p {
  margin: 0;
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}
