/* Shyo2 shared foundation — minimalist editorial system */

@font-face {
  font-family: "Pretendard Variable";
  src: url("/PretendardVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 45 920;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-subtle: #f7f7f6;
  --bg-muted: #f3f3f2;
  --bg-desk: #f4f4f2;
  --fg: #282828;
  --fg-1: #3c3836;
  --fg-2: #504945;
  --fg-3: #676767;
  --fg-4: #969696;
  --rule: rgba(40, 40, 40, 0.08);
  --rule-strong: rgba(40, 40, 40, 0.16);
  --azure: #0387e7;
  --cobalt: #0155bf;
  --red: #ef402c;
  --yellow: #ffce52;
  --amber: #f7a224;
  --emerald: #0e9972;
  --spool: #c8c8c5;
  --danger-bg: #fdf4f3;
  --danger-rule: rgba(239, 64, 44, 0.24);
  --danger-fg: #b42c1d;
  --font-sans: "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Malgun Gothic", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --site-header-height: 54px;
  --content-pad: clamp(18px, 4vw, 32px);
  --content-max: 660px;
  --wide-max: 960px;
}

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

html {
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-padding-top: calc(var(--site-header-height) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "ss06";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

body:lang(ko) {
  word-break: keep-all;
  overflow-wrap: break-word;
}

body.menu-open {
  overflow: hidden;
}

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

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

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

img,
svg {
  display: block;
}

::selection {
  background-color: rgba(0, 0, 0, 0.1);
}

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

[hidden] {
  display: none !important;
}

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

/* ── Fixed minimalist site header ──────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--site-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--content-pad);
  background: rgba(255, 255, 255, 0.94);
  transition: border-color 0.2s ease;
  border-bottom: 1px solid transparent;
}

@supports (backdrop-filter: blur(8px)) {
  .site-header {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(10px);
  }
}

.site-header.is-scrolled {
  border-bottom-color: var(--rule);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  font-size: 14.5px;
  font-weight: 560;
  letter-spacing: 0.14em;
  color: var(--fg-3);
  transition: opacity 0.2s ease, color 0.2s ease;
}

.site-brand:hover {
  color: var(--fg);
}

.site-brand img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.site-brand-home {
  opacity: 0;
  pointer-events: none;
}

.site-header.is-scrolled .site-brand-home {
  opacity: 1;
  pointer-events: auto;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.top-nav a {
  font-size: 14.5px;
  font-weight: 430;
  letter-spacing: -0.01em;
  color: var(--fg-1);
  padding: 6px 0;
  transition: color 0.16s ease;
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  color: #000000;
  text-decoration: underline;
  text-decoration-color: rgba(40, 40, 40, 0.24);
  text-underline-offset: 4px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--fg-1);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: var(--site-header-height) 0 0 0;
  z-index: 99;
  background: var(--bg);
  padding: 28px var(--content-pad) 40px;
  overflow-y: auto;
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: 20px;
  font-weight: 450;
  letter-spacing: -0.02em;
  color: var(--fg);
  border-bottom: 1px solid var(--rule);
}

.mobile-menu-nav a:last-child {
  border-bottom: 0;
}

@media (max-width: 680px) {
  :root {
    --site-header-height: 50px;
  }

  .top-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }
}

/* ── Shared tactile buttons (Tinker-inspired pills) ────────────── */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    opacity 0.16s ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-pill {
  color: #111111;
  background: linear-gradient(180deg, #f3f2f2 0%, #e7e7e6 90%);
  border-color: rgba(40, 40, 40, 0.05);
}

.btn-pill:hover:not(:disabled) {
  background: linear-gradient(180deg, #ececeb 0%, #dfdfde 90%);
}

.btn-solid {
  color: #ffffff;
  background: #242422;
  border-color: #242422;
}

.btn-solid:hover:not(:disabled) {
  background: #3a3a37;
  border-color: #3a3a37;
}

.btn-outline {
  color: var(--fg);
  background: #ffffff;
  border-color: var(--rule-strong);
}

.btn-outline:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: rgba(40, 40, 40, 0.28);
}

.btn-plain {
  color: var(--fg);
  background: transparent;
  padding-inline: 10px;
}

.btn-plain:hover:not(:disabled) {
  color: #000000;
}

.btn-plain .chev {
  display: inline-block;
  color: var(--fg-3);
  transition: transform 0.18s ease, color 0.18s ease;
}

.btn-plain:hover .chev {
  transform: translateX(2px);
  color: #000000;
}

.btn-sm {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13.5px;
}

/* ── Shared minimal footer ─────────────────────────────────────── */

.site-footer {
  width: 100%;
  margin-top: auto;
  padding: 56px var(--content-pad) 40px;
  border-top: 1px solid var(--rule);
  background: var(--bg);
}

.footer-inner {
  width: 100%;
  max-width: var(--footer-max, var(--content-max));
  margin-inline: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, max-content));
  gap: 28px 64px;
}

.footer-col h4 {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-4);
  margin-bottom: 10px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.footer-col a {
  font-size: 14px;
  color: var(--fg-2);
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: #000000;
  text-decoration: underline;
  text-decoration-color: rgba(40, 40, 40, 0.24);
  text-underline-offset: 3px;
}

.footer-meta {
  margin-top: 44px;
  font-size: 13px;
  color: var(--fg-4);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}
