/*
  Shared styles for every page of the Woody Nest site.
  Fonts are system stacks on purpose: privacy-policy pages load no third-party resources.
*/

:root {
  --bg: #f6f1e9;
  --surface: #fffcf7;
  --ink: #1f1a14;
  --muted: #6b6155;
  --line: #e4d9c8;
  --accent: #b5582a;
  --accent-ink: #ffffff;
  --forest: #2e5a4c;
  --ring: rgba(120, 84, 48, 0.07);
  --shadow: 0 1px 2px rgba(40, 28, 16, 0.06), 0 8px 24px rgba(40, 28, 16, 0.06);
  --radius: 20px;
  --wrap: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14120f;
    --surface: #1d1a16;
    --ink: #f2ece3;
    --muted: #a69c8f;
    --line: #322c25;
    --accent: #e3824f;
    --accent-ink: #1a110b;
    --forest: #7fb8a4;
    --ring: rgba(227, 130, 79, 0.06);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    16px/1.7 -apple-system,
    BlinkMacSystemFont,
    'Apple SD Gothic Neo',
    'Malgun Gothic',
    'Segoe UI',
    Roboto,
    sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--surface);
  border-radius: 8px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
}

.brand svg {
  width: 30px;
  height: 30px;
}

.brand small {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.85rem;
}

.mark-egg {
  fill: var(--accent);
}

.mark-twig {
  stroke: var(--bg);
}

.site-nav {
  display: flex;
  gap: 4px;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 99px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--line);
}

@media (max-width: 560px) {
  .brand small {
    display: none;
  }
  .site-nav a {
    padding: 8px 9px;
  }
}

/* Home: hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 88px;
}

/* Tree-ring backdrop for the "wood" in the name. */
.hero::before {
  content: '';
  position: absolute;
  right: -260px;
  top: -200px;
  width: 820px;
  height: 820px;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at 50% 50%,
    transparent 0 22px,
    var(--ring) 22px 24px
  );
  pointer-events: none;
}

.hero .wrap {
  position: relative;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 20px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--forest);
}

.hero h1 {
  margin: 0;
  max-width: 14em;
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  line-height: 1.22;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.lead {
  max-width: 34em;
  margin: 24px 0 0;
  font-size: 1.12rem;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 99px;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.btn:hover {
  border-color: var(--muted);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn.primary:hover {
  filter: brightness(1.06);
}

/* Home: sections */

.section {
  padding: 80px 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 36px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.section .eyebrow {
  margin-bottom: 10px;
}

/* Home: titles */

.titles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.title-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Each cover keeps its title's own colors in both site themes. */
.cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.cover-glyph {
  font-family: 'Apple SD Gothic Neo', 'Noto Serif CJK KR', 'Batang', serif;
  font-size: clamp(5rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
}

.cover-hwarang {
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 46, 126, 0.45), transparent 42%),
    radial-gradient(circle at 18% 88%, rgba(0, 209, 255, 0.3), transparent 45%),
    #14162b;
  color: #f4f5fa;
}

.cover-hwarang .cover-glyph {
  text-shadow: 0 0 32px rgba(255, 46, 126, 0.6);
}

.cover-boardbeat {
  background:
    repeating-linear-gradient(-24deg, transparent 0 26px, rgba(255, 255, 255, 0.05) 26px 30px),
    radial-gradient(circle at 22% 82%, rgba(198, 255, 61, 0.38), transparent 45%),
    radial-gradient(circle at 80% 18%, rgba(124, 77, 255, 0.65), transparent 50%),
    #1a1033;
  color: #d8ff6b;
}

.cover-boardbeat .cover-glyph {
  text-shadow: 0 0 32px rgba(198, 255, 61, 0.55);
}

.cover-palja {
  background:
    radial-gradient(circle at 50% 50%, rgba(154, 109, 28, 0.18), transparent 60%),
    #faf6ee;
  color: #9a6d1c;
}

.cover-palja::before {
  content: '';
  position: absolute;
  inset: 18px;
  border: 2px solid rgba(154, 109, 28, 0.35);
  border-radius: 10px;
}

.title-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px 24px 22px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--forest);
  background: color-mix(in srgb, var(--forest) 12%, transparent);
}

.tags li.soon {
  color: var(--muted);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}

.title-body h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.title-en {
  margin: 2px 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.title-body > p:not(.title-en) {
  margin: 0 0 20px;
}

.title-links {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.title-links a {
  font-weight: 700;
  text-decoration: none;
}

.title-links a:hover {
  text-decoration: underline;
}

/* Home: studio principles */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.principles li {
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.principles .num {
  display: block;
  margin-bottom: 14px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.principles h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.principles p {
  margin: 0;
  color: var(--muted);
}

/* Home: contact */

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px;
  border-radius: calc(var(--radius) + 4px);
  background: var(--forest);
  color: #f6f1e9;
}

@media (prefers-color-scheme: dark) {
  .contact {
    background: #1f3a31;
  }
}

.contact h2 {
  margin: 0 0 6px;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.02em;
}

.contact p {
  margin: 0;
  opacity: 0.85;
}

.contact .btn {
  background: #f6f1e9;
  border-color: #f6f1e9;
  color: #1f1a14;
}

@media (max-width: 560px) {
  .hero {
    padding: 64px 0 56px;
  }
  .section {
    padding: 56px 0;
  }
  .contact {
    padding: 28px 22px;
  }
}

/* Footer */

.site-footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

/* Policy pages */

.policy-hero {
  padding: 48px 0 8px;
}

.policy-hero .wrap,
.policy .wrap {
  max-width: 800px;
}

.crumbs {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

.crumbs a {
  color: var(--muted);
}

.policy-app {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  font-family: 'Apple SD Gothic Neo', 'Noto Serif CJK KR', 'Batang', serif;
  font-size: 2rem;
  font-weight: 800;
}

.app-icon.cover-palja::before {
  inset: 5px;
  border-width: 1.5px;
  border-radius: 10px;
}

.app-icon.cover-palja {
  position: relative;
}

.policy-app p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.policy-app strong {
  display: block;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.35;
}

.lang-switch {
  display: inline-flex;
  gap: 4px;
  margin-top: 24px;
  padding: 4px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.lang-switch a {
  padding: 6px 16px;
  border-radius: 99px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.lang-switch a:hover {
  color: var(--ink);
  background: var(--line);
}

.policy {
  padding: 16px 0 72px;
}

.policy section {
  scroll-margin-top: 80px;
  padding: 36px 32px 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.policy section + section {
  margin-top: 28px;
}

.policy h1 {
  margin: 0 0 4px;
  font-size: clamp(1.45rem, 3.6vw, 1.85rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.policy h2 {
  margin: 40px 0 10px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 1.1rem;
  color: var(--accent);
}

.policy .meta {
  display: inline-block;
  margin: 8px 0 24px;
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.9rem;
}

.policy ul {
  padding-left: 1.2em;
}

.policy li + li {
  margin-top: 6px;
}

.policy table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.94rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  border-spacing: 0;
}

.policy th,
.policy td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.policy tbody tr:last-child td {
  border-bottom: none;
}

.policy th {
  background: var(--bg);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
}

@media (max-width: 560px) {
  .policy section {
    padding: 28px 18px 32px;
  }
  .policy table,
  .policy tbody,
  .policy tr,
  .policy th,
  .policy td {
    display: block;
  }
  .policy thead {
    display: none;
  }
  .policy td {
    border-bottom: none;
    padding: 4px 14px;
  }
  .policy tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }
  .policy tbody tr:last-child {
    border-bottom: none;
  }
  .policy td:first-child {
    font-weight: 700;
    padding-top: 10px;
  }
}
