/* Galapagos Studio — editorial. Values follow design/design_handoff_galapagos_studio/README.md */
:root {
  --paper: #F6F1E7;
  --ink: #1A1814;
  --body2: #5A554C;
  --caption: #7A7266;
  --inactive: #9A9284;
  --accent: #B85A1B;
  --select: #F2C79E;
  --band: #EFE8DA;
  --rule-strong: 1px solid #1A1814;
  --rule-mid: 1px solid rgba(26, 24, 20, .3);
  --rule-soft: 1px solid rgba(26, 24, 20, .2);
  --serif-display: 'Gloock', 'Gowun Batang', serif;
  --serif: 'Gowun Batang', serif;
  --mono: 'Recursive', 'Gowun Batang', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); -webkit-font-smoothing: antialiased; word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: var(--select); }
.mono { font-family: var(--mono); font-variation-settings: 'MONO' 1; }

.page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; }
.container {
  width: 100%; max-width: 1160px; padding: 0 clamp(20px, 5vw, 56px) 56px;
  display: flex; flex-direction: column;
}

/* Header */
.site-header { display: flex; align-items: center; gap: 24px; padding: 22px 0; border-bottom: var(--rule-strong); }
.site-header .logo { display: flex; }
.site-header .logo img { height: 26px; display: block; }
.spacer { flex: 1; }
.nav { display: flex; gap: 22px; font-size: 14px; }
.lang { display: flex; gap: 6px; font-size: 11px; }
.lang a { color: var(--inactive); text-underline-offset: 3px; }
.lang a[aria-current] { color: var(--ink); text-decoration: underline; }
.lang .sep { color: var(--inactive); }
.meta { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: var(--rule-mid); font-size: 10.5px; letter-spacing: .08em; }

/* Home — hero */
.hero {
  /* Headline takes only its own width; the copy sits right beside it. */
  display: grid; grid-template-columns: max-content minmax(0, 30em);
  gap: 48px 64px; padding: 64px 0 72px; border-bottom: var(--rule-strong);
}
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.hero h1 { margin: 0; font-family: 'Gloock', serif; font-weight: 400; font-size: clamp(52px, 6.6vw, 84px); line-height: 1.02; letter-spacing: -.02em; }
.hero-copy { display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; }
.lead { margin: 0; font-size: 23px; line-height: 1.6; text-wrap: pretty; }
.sub { margin: 0; font-size: 15.5px; line-height: 1.85; color: var(--body2); text-wrap: pretty; }

/* Section label row */
.label-row { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: var(--rule-mid); font-size: 10.5px; letter-spacing: .08em; }
.label { font-size: 10.5px; letter-spacing: .08em; }

/* Apps grid */
.apps { display: flex; flex-direction: column; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); border-bottom: var(--rule-strong); }
.app-card { padding: 28px 28px 36px; border-right: 1px solid rgba(26, 24, 20, .25); display: flex; flex-direction: column; gap: 14px; }
.app-card:hover { background: rgba(26, 24, 20, .03); color: inherit; }
.app-card .no { font-size: 10.5px; }
.app-card .name { font-family: var(--serif-display); font-size: 38px; line-height: 1.1; white-space: nowrap; }
.app-card .name.hangul, .other .name.hangul { font-family: var(--serif); font-weight: 700; letter-spacing: -.03em; }
.app-card .name.hangul { font-size: 35px; }
.app-card .line { font-size: 15.5px; line-height: 1.75; color: var(--body2); text-wrap: pretty; }
.app-card .read { font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.app-card:hover .read { color: var(--accent); }

/* About */
.about { display: grid; grid-template-columns: minmax(160px, 220px) minmax(0, 1fr); gap: 56px; padding: 56px 0; border-bottom: var(--rule-strong); }
@media (max-width: 720px) { .about { grid-template-columns: 1fr; gap: 32px; } .about .photo { max-width: 200px; } }
.about-media { display: flex; flex-direction: column; gap: 16px; }
.slot { background: var(--band); display: flex; align-items: center; justify-content: center; color: var(--caption); font-size: 13px; }
.photo { aspect-ratio: 4 / 5; width: 100%; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.caption { font-size: 12.5px; color: var(--caption); }
.about-text { display: flex; flex-direction: column; gap: 22px; padding-top: 30px; }
.about-text .p1 { margin: 0; font-size: 21px; line-height: 1.8; text-wrap: pretty; }
.drop { float: left; font-family: 'Gloock', serif; font-size: 68px; line-height: .9; padding: 6px 10px 0 0; }
.about-text .p2 { margin: 0; font-size: 16px; line-height: 1.9; color: var(--body2); text-wrap: pretty; }
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; border-top: var(--rule-mid); margin-top: 8px; }
.people div { display: flex; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: var(--rule-soft); }
.people .who { font-size: 17px; flex: 1; }
.people .where { font-size: 10.5px; color: var(--caption); }

/* Journal */
.journal { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 24px 40px; padding: 44px 0 56px; }
.journal-list { grid-column: span 3; display: flex; flex-direction: column; min-width: 0; }
.post { display: flex; gap: 24px; padding: 14px 0; border-bottom: var(--rule-soft); align-items: baseline; }
.post .date { font-size: 11px; width: 84px; flex-shrink: 0; }
.post .title { flex: 1; min-width: 0; font-size: 17px; line-height: 1.55; text-wrap: pretty; }
.post .tag { font-size: 10.5px; color: var(--caption); white-space: nowrap; }
@media (max-width: 720px) { .journal-list { grid-column: auto; } }

/* App detail */
.detail-top { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: var(--rule-mid); font-size: 10.5px; letter-spacing: .08em; }
.detail-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 40px 64px; padding: 64px 0 56px; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 22px; }
.detail-icon { width: 72px; height: 72px; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px rgba(26, 24, 20, .1), 0 8px 20px rgba(60, 48, 30, .1); }
.detail-icon img { width: 100%; height: 100%; display: block; }
.title-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.title-row h1 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(40px, 4.6vw, 56px); line-height: 1.1; letter-spacing: -.03em; white-space: nowrap; }
.title-row .latin { font-family: 'Gloock', serif; font-style: italic; font-size: 20px; color: var(--caption); white-space: nowrap; }
.detail-line { margin: -6px 0 0; max-width: 30em; font-size: 20px; line-height: 1.7; color: #3A362F; text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 6px; }
.cta { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14.5px; white-space: nowrap; }
.cta:hover { background: var(--accent); color: var(--paper); }
.cta .arrow { font-family: var(--mono); font-size: 13px; }
.cta.alt { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cta.alt:hover { background: var(--ink); color: var(--paper); }
.cta.soon { background: transparent; color: var(--caption); box-shadow: inset 0 0 0 1px rgba(26, 24, 20, .3); cursor: default; }
.ask { font-size: 14px; color: var(--body2); border-bottom: 1px solid rgba(26, 24, 20, .3); padding-bottom: 1px; white-space: nowrap; }
.ask:hover { color: var(--ink); }
.specs { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 24px; border-top: var(--rule-mid); font-size: 13.5px; }
.specs .k { padding: 11px 0; border-bottom: 1px solid rgba(26, 24, 20, .15); white-space: nowrap; font-size: 10.5px; letter-spacing: .08em; color: var(--caption); }
.specs .v { padding: 10px 0; border-bottom: 1px solid rgba(26, 24, 20, .15); }

.shots-band { background: var(--band); border-radius: 4px; padding: clamp(28px, 5vw, 56px); margin-bottom: 56px; }
.phones { display: flex; justify-content: center; gap: clamp(12px, 3vw, 32px); }
.phone { flex: 1; max-width: 240px; display: flex; flex-direction: column; gap: 12px; }
.phone .screen { aspect-ratio: 9 / 19.5; width: 100%; border-radius: clamp(18px, 2.4vw, 30px); overflow: hidden; background: var(--paper); box-shadow: 0 0 0 6px var(--ink), 0 24px 48px rgba(40, 32, 20, .18); }
.fig { margin-top: 8px; font-size: 12.5px; color: var(--body2); text-align: center; }
.mac { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.mac .window { border-radius: 10px; overflow: hidden; background: var(--paper); box-shadow: 0 0 0 1px rgba(26, 24, 20, .14), 0 28px 56px rgba(40, 32, 20, .18); }
.mac .bar { height: 26px; background: #E4DCCB; display: flex; align-items: center; gap: 6px; padding: 0 10px; }
.mac .bar span { width: 9px; height: 9px; border-radius: 50%; background: #D5CBB7; }
.mac .screen { aspect-ratio: 16 / 10; width: 100%; }
.screen img { width: 100%; height: 100%; object-fit: cover; display: block; }

.detail-journal { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 24px 40px; padding: 40px 0 56px; }
.others { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 40px; }
.other { flex: 1; min-width: 240px; padding: 20px 0; border-top: var(--rule-strong); display: flex; align-items: baseline; gap: 12px; }
.other .no { font-size: 10.5px; }
.other .name { font-family: var(--serif-display); font-size: 26px; white-space: nowrap; }
.other .go { font-size: 14px; }

/* Legal pages */
.legal { max-width: 720px; padding: 56px 0 72px; }
.legal h1 { margin: 0 0 8px; font-family: var(--serif); font-weight: 700; font-size: clamp(34px, 4vw, 44px); letter-spacing: -.02em; }
.legal .updated { font-size: 10.5px; letter-spacing: .08em; color: var(--caption); margin-bottom: 32px; }
.legal h2 { font-size: 19px; margin: 32px 0 8px; }
.legal p, .legal li { font-size: 16px; line-height: 1.9; color: #3A362F; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }

/* Footer */
.site-footer { display: flex; flex-direction: column; border-top: var(--rule-strong); }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 32px; padding: 36px 0 40px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col:first-child { gap: 12px; }
.footer-col img { height: 24px; width: auto; align-self: flex-start; }
.footer-col .tagline { font-size: 13.5px; line-height: 1.7; color: var(--body2); text-wrap: pretty; }
.footer-col .head { font-size: 10px; letter-spacing: .1em; color: var(--caption); margin-bottom: 4px; }
.footer-col a, .footer-col .plain { font-size: 14px; white-space: nowrap; }
.footer-col .plain { color: var(--body2); }
.footer-col .strong { font-weight: 700; }
.biz { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 16px 0 0; border-top: var(--rule-soft); font-size: 12px; line-height: 1.7; color: var(--caption); }
.biz .copy { font-size: 10.5px; }

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

/* Hangul in mono labels: no Latin tracking, slightly larger so it reads at the same size. */
:lang(ko) .meta, :lang(ko) .label-row, :lang(ko) .label, :lang(ko) .detail-top,
:lang(ko) .specs .k, :lang(ko) .footer-col .head { letter-spacing: .02em; }
:lang(ko) .label-row, :lang(ko) .label, :lang(ko) .specs .k, :lang(ko) .footer-col .head { font-size: 11.5px; }
/* 4. Language toggle a hair larger to sit with the 14px nav. */
.lang { font-size: 12px; }

/* App Store screenshots: already framed, so no device bezel. */
.store-shots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(8px, 1.4vw, 16px); }
.store-shots img { width: 100%; height: auto; display: block; border-radius: 10px; box-shadow: 0 0 0 1px rgba(26, 24, 20, .08), 0 14px 30px rgba(40, 32, 20, .14); }
@media (max-width: 860px) { .store-shots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Per-app intro: three short points under the hero. */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); border-top: var(--rule-strong); margin-bottom: 40px; }
.feature { padding: 22px 28px 26px 0; display: flex; flex-direction: column; gap: 8px; }
.feature + .feature { padding-left: 28px; border-left: 1px solid rgba(26, 24, 20, .25); }
.feature .no { font-size: 10.5px; color: var(--caption); }
.feature h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.feature p { margin: 0; font-size: 15px; line-height: 1.75; color: var(--body2); text-wrap: pretty; }
@media (max-width: 720px) { .feature + .feature { padding-left: 0; border-left: 0; border-top: var(--rule-soft); } }

/* Live demo / video inside the Mac window. */
.mac .screen iframe { width: 100%; height: 100%; border: 0; display: block; pointer-events: none; }
.mac .screen.video { aspect-ratio: auto; }
.mac .screen video { width: 100%; height: auto; display: block; }
.actions .cta + .cta { margin-left: -8px; }
.mac .window.plain { background: #161513; }

/* Writing */
a.post:hover .title { color: var(--accent, #B85A1B); }
.article { padding-bottom: 72px; }
.article-head, .prose { max-width: 720px; margin-left: auto; margin-right: auto; }
.article-head { padding: 56px 0 32px; border-bottom: var(--rule-mid); margin-bottom: 36px; }
.article-head h1 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 4vw, 44px); line-height: 1.3; letter-spacing: -.03em; text-wrap: balance; }
.article-head .dek { margin: 16px 0 0; font-size: 18px; line-height: 1.7; color: #5A554C; }
.article-head .byline { display: flex; gap: 18px; margin-top: 22px; font-size: 10.5px; letter-spacing: .08em; color: #7A7266; text-transform: uppercase; }
.prose { font-size: 17px; line-height: 1.95; color: #2A2620; }
.prose p { margin: 0 0 1.3em; }
.prose h2, .prose h3 { font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.45; letter-spacing: -.02em; margin: 2.2em 0 .8em; }
.prose h4 { font-size: 18px; margin: 1.8em 0 .6em; }
.prose ul, .prose ol { margin: 0 0 1.3em; padding-left: 1.3em; }
.prose li { margin: .4em 0; }
.prose strong { font-weight: 700; color: #1A1814; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose code { font-family: var(--mono); font-variation-settings: 'MONO' 1; font-size: .82em; background: rgba(26,24,20,.06); padding: .1em .35em; border-radius: 3px; word-break: break-all; }
.prose pre { background: #EFE8DA; padding: 18px 20px; border-radius: 4px; overflow-x: auto; margin: 0 0 1.5em; line-height: 1.7; }
.prose pre code { background: none; padding: 0; font-size: 13px; word-break: normal; white-space: pre; }
.prose figure { margin: 2em 0; }
.prose img { display: block; margin: 2em auto; max-width: 100%; height: auto; border: 1px solid rgba(26,24,20,.15); border-radius: 10px; }
/* Phone recordings are portrait — cap them like the original blog so they aren't blown up. */
.prose video.shot { display: block; margin: 2em auto; width: 100%; max-width: min(380px, 100%); height: auto; border-radius: 14px; background: #EFE8DA; }
.prose figcaption { margin-top: 10px; font-size: 13px; line-height: 1.7; color: #7A7266; }
.prose .table { overflow-x: auto; margin: 0 0 1.6em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.7; }
.prose th { text-align: left; font-family: var(--mono); font-variation-settings: 'MONO' 1; font-size: 10.5px; letter-spacing: .06em; font-weight: 400; color: #7A7266; border-bottom: 1px solid #1A1814; padding: 8px 12px 8px 0; }
.prose td { border-bottom: 1px solid rgba(26,24,20,.15); padding: 10px 12px 10px 0; vertical-align: top; }
.prose td:first-child { white-space: nowrap; }
.article { width: 100%; min-width: 0; }
.prose > * { max-width: 100%; }

/* Journal notes: tap a row to read why it was done */
.post-note summary { cursor: pointer; list-style: none; }
.post-note summary::-webkit-details-marker { display: none; }
.post-note summary:hover .title { color: #B85A1B; }
.post-note .toggle { font-size: 13px; color: #7A7266; transition: transform .2s ease; }
.post-note[open] .toggle { transform: rotate(45deg); }
.post-note[open] summary { border-bottom: 0; }
.post-note[open] { border-bottom: 1px solid rgba(26,24,20,.2); }
.post-note p { margin: 0; padding: 0 0 18px 108px; font-size: 15px; line-height: 1.85; color: #5A554C; max-width: calc(44em + 108px); }
@media (max-width: 560px) { .post-note p { padding-left: 0; } }

/* Notchsing demo: dark screen bezel like notchsing.galapagos.so */
.mac .bezel { background: #0E0E11; padding: 10px; border-radius: 18px; box-shadow: 0 0 0 1px rgba(26, 24, 20, .5), 0 14px 32px rgba(40, 32, 20, .16); }
.mac .bezel .screen { border-radius: 9px; overflow: hidden; aspect-ratio: 16 / 10; background: #1c2240; }
.char-tabs { display: flex; justify-content: center; gap: 26px; margin-top: 18px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.char-tabs button { font: inherit; letter-spacing: inherit; text-transform: inherit; background: none; border: 0; padding: 4px 0; color: #5A554C; cursor: pointer; }
.char-tabs button:hover { color: #1A1814; }
.char-tabs button[aria-current] { color: #1A1814; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px; }

/* slips: 개인 / 팀 */
.mode-tabs { font-family: var(--serif); font-size: 15px; letter-spacing: 0; text-transform: none; gap: 28px; }
.mode-tabs button[aria-current] { font-weight: 700; }
.mode-msg { margin: 0 auto; max-width: 34em; text-align: center; font-size: 16px; line-height: 1.75; color: #3A362F; text-wrap: balance; }

/* slips: 단계 막대 (slips.galapagos.so 히어로처럼) */
.mac > .mode-tabs { margin-bottom: 2px; }
.mac > .mode-msg { margin-bottom: 6px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 4px 0 18px; }
.step { opacity: .42; transition: opacity .3s; }
.step.on { opacity: 1; }
.step .sno { font-size: 10.5px; letter-spacing: .08em; color: #7A7266; }
.step.on .sno { color: #B85A1B; }
.step h3 { margin: 4px 0 2px; font-family: var(--serif); font-weight: 700; font-size: 16px; }
.step p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.6; color: #5A554C; min-height: 3.2em; }
.step .track { height: 2px; background: rgba(26,24,20,.12); border-radius: 2px; overflow: hidden; }
.step .track i { display: block; height: 100%; width: 0; background: #B85A1B; }
@media (max-width: 560px) { .step p { display: none; } .steps { gap: 10px; } }

/* slips: 개인/팀 탭 — 글자 탭 그대로, 안 고른 쪽은 점선 밑줄(링크처럼 누를 수 있다는 작은 표시) */
.mode-tabs button { cursor: pointer; color: #5A554C; text-decoration: underline dashed rgba(26,24,20,.35); text-decoration-thickness: 1px; text-underline-offset: 6px; transition: color .15s, text-decoration-color .15s; }
.mode-tabs button:hover { color: #B85A1B; text-decoration-color: #B85A1B; }
.mode-tabs button[aria-current] { color: #1A1814; text-decoration: underline solid #1A1814; text-decoration-thickness: 1.5px; cursor: default; }
.mode-tabs button:focus-visible { outline: 2px solid #B85A1B; outline-offset: 4px; }
