/* 유한회사 사십육헤르쯔 (46hz.co.kr): one stylesheet for the three languages. Brand colours from the 46Hz logo and
   design tokens; the ground is a cool mist so the company page reads apart from the warm paper of the 46hz.kr brief. */

@font-face {
  font-family: "Site Round";
  src: url("fonts/NanumSquareRoundOTFR.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Site Round";
  src: url("fonts/NanumSquareRoundOTFB.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Site Letter";
  src: url("fonts/MaruBuri-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Site Letter";
  src: url("fonts/MaruBuri-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}
/* Chinese only: Han characters and the full-width punctuation Chinese sets in its own form. Only the Chinese page (and
   the Chinese line of the 404 page) names this family, so the Korean and English pages never fetch it. */
@font-face {
  font-family: "Site Han";
  src: url("fonts/ResourceHanRoundedSC-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+3001-3002, U+4E00-9FFF, U+FF01, U+FF08-FF09, U+FF0C, U+FF1A-FF1B, U+FF1F;
}
@font-face {
  font-family: "Site Han";
  src: url("fonts/ResourceHanRoundedSC-Bold.woff2") format("woff2");
  font-weight: 600 700;
  font-display: swap;
  unicode-range: U+3001-3002, U+4E00-9FFF, U+FF01, U+FF08-FF09, U+FF0C, U+FF1A-FF1B, U+FF1F;
}

:root {
  color-scheme: light dark;
  --ground: #f1f5f4;
  --panel: hsl(172 32% 92%);
  --stationery: #fbfcfc;
  --ink: #222834;
  --ink-soft: hsl(212 16% 33%);
  --rule: hsl(190 14% 80%);
  --quiet-wave: hsl(194 12% 70%);
  --quiet: hsl(190 16% 89%);
  --teal: #22776b;
  --teal-ink: #ffffff;
  /* The highlighted wave keeps 3:1 against the ground along its whole length (the logo's lighter blues fall to 2:1). */
  --wave-a: #22776b;
  --wave-b: #2a8f92;
  --wave-c: #2b80b0;
  --wide: 64rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --round: "Site Round", "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --letter: "Site Letter", "Noto Serif KR", Georgia, serif;
  /* x-height / em of each brand face (OS/2 sxHeight): NanumSquareRound Regular 528/1000, MaruBuri SemiBold 476/1000.
     The brand face itself renders unchanged; a fallback font shown while it loads (or if it fails) is scaled to the
     same x-height, so the swap moves less. Browsers without font-size-adjust draw every font at its natural size,
     which is the design as drawn. */
  --adjust-round: 0.528;
  --adjust-round-bold: 0.535;
  --adjust-letter: 0.476;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0d1418;
    --panel: hsl(180 28% 11%);
    --stationery: hsl(200 18% 13%);
    --ink: #e7ecf3;
    --ink-soft: hsl(205 14% 70%);
    --rule: hsl(200 14% 24%);
    --quiet-wave: hsl(200 12% 36%);
    --quiet: hsl(200 16% 17%);
    --teal: #3dbba5;
    --teal-ink: #0b1a17;
    --wave-a: #3dbba5;
    --wave-b: #6ccbd6;
    --wave-c: #9ad8f7;
  }
}

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

/* A word too long for a whole line (a large heading at 200 % text on a phone, an address) breaks instead of making
   the page scroll sideways. Korean keeps its words together otherwise. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-wrap: anywhere;
}

html:lang(ko) {
  word-break: keep-all;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--round);
  font-size: 1.0625rem;
  font-size-adjust: var(--adjust-round);
  line-height: 1.75;
}

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

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

/* NanumSquareRound Bold has its own x-height (535/1000). */
.button,
dl.reasons dt,
strong,
.resonance .seventh-label {
  font-size-adjust: var(--adjust-round-bold);
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  background: var(--teal);
  color: var(--teal-ink);
  padding: 0.6rem 1rem;
  border-radius: 0.75rem;
  z-index: 10;
}

.skip:focus {
  top: 0.75rem;
}

/* Top bar: the company logo and the languages. The way to get in touch is in the hero right below. It wraps rather
   than scrolls sideways when the text is scaled up. */
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* The picture only chooses the light or dark drawing; the image is the flex item. */
.brand picture {
  display: contents;
}

.brand img {
  width: auto;
  height: 1.9rem;
}

.bar nav {
  margin-left: auto;
}

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin-block: 0;
}

.langs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.6rem;
  border-radius: 0.75rem;
  color: var(--ink-soft);
  text-decoration: none;
}

/* The current language is marked by an underline in the brand colour (3:1 or more against the chip and the ground),
   not by colour alone; the underline also survives forced colours, where the chip's background does not. */
.langs a[aria-current="page"] {
  color: var(--ink);
  background: var(--quiet);
  text-decoration: underline 2px var(--teal);
  text-underline-offset: 0.4em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.25rem;
  border-radius: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--teal);
}

.button.primary {
  background: var(--teal);
  color: var(--teal-ink);
}

.button.quiet {
  color: var(--teal);
  background: transparent;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Hero: the vision, then the seven modes of the Schumann resonance. The seventh is the company's name. */
.hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(2.5rem, 9vw, 6rem) var(--gutter) 0;
}

/* Fluid sizes add a rem part to the viewport part, so browser zoom and text scaling still enlarge them, and keep the
   largest size within 2.5 times the smallest. */
.hero h1 {
  font-family: var(--letter);
  font-size-adjust: var(--adjust-letter);
  font-weight: 600;
  font-size: clamp(2.4rem, 1.6rem + 4vw, 4.6rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 14em;
  text-wrap: balance;
}

.lede {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 44rem;
  margin: 1.5rem 0 0;
}

.resonance {
  margin: clamp(2.75rem, 7vw, 4.5rem) 0 0;
}

.resonance svg {
  display: block;
  width: 100%;
  height: auto;
}

.resonance .mode {
  stroke: var(--quiet-wave);
  stroke-width: 1.5;
}

/* Drawn in full by default; the one-time drawing-in runs only for visitors who have not asked for reduced motion. */
.resonance .seventh {
  stroke: url(#seventh);
  stroke-width: 4;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;

  @media (prefers-reduced-motion: no-preference) {
    animation: resonate 2.8s cubic-bezier(0.33, 0, 0.2, 1) 0.3s backwards;
  }
}

.resonance .wave-a {
  stop-color: var(--wave-a);
}

.resonance .wave-b {
  stop-color: var(--wave-b);
}

.resonance .wave-c {
  stop-color: var(--wave-c);
}

.resonance .hz {
  fill: var(--ink-soft);
  font-family: var(--round);
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

.resonance .seventh-label {
  fill: var(--teal);
  font-weight: 700;
}

.resonance figcaption {
  color: var(--ink-soft);
  max-width: 42rem;
  margin-top: 1.25rem;
}

@keyframes resonate {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* Forced colours (Windows contrast themes): the waves and their labels take the user's system colours, the seventh
   in the highlight colour, so it still stands out without the gradient. */
@media (forced-colors: active) {
  .resonance .mode {
    stroke: GrayText;
  }
  .resonance .seventh {
    stroke: Highlight;
  }
  .resonance .hz {
    fill: CanvasText;
  }
  .resonance .seventh-label {
    fill: Highlight;
  }
}

/* The labels would shrink below reading size on a phone; the caption says the same thing there. The seventh wave's
   stroke is in drawing units (so its dash can draw it), so it gets thicker where the drawing gets smaller. */
@media (max-width: 40rem) {
  .resonance .hz {
    display: none;
  }
  .resonance .seventh {
    stroke-width: 9;
  }
}

/* The body runs one column, left aligned, as wide as the hero. */
main > section {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 6.5rem) var(--gutter) 0;
}

h2 {
  font-family: var(--letter);
  font-size-adjust: var(--adjust-letter);
  font-weight: 600;
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.5rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}

h1.page-title {
  font-family: var(--letter);
  font-size-adjust: var(--adjust-letter);
  font-weight: 600;
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.5rem);
  line-height: 1.3;
  margin: 0 0 1.25rem;
}

p {
  margin: 0 0 1.1rem;
  text-wrap: pretty;
}

/* Running text stays under about 80 characters a line (about 40 Hangul syllables). */
main > section > p,
main > section > ul {
  max-width: 42rem;
}

.note {
  color: var(--ink-soft);
}

/* A line the company stands on, set large in the letter face. */
.quote {
  font-family: var(--letter);
  font-size-adjust: var(--adjust-letter);
  font-weight: 600;
  font-size: clamp(1.5rem, 1rem + 1.8vw, 2.2rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--teal);
  max-width: 24em;
  margin: 2rem 0;
  text-wrap: balance;
}

/* Commitments: each promise on the left, what it means on the right, one row per promise. */
dl.pledges {
  margin: 2.25rem 0 0;
  display: grid;
  grid-template-columns: minmax(11rem, 17rem) 1fr;
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
}

dl.pledges dt,
dl.pledges dd {
  border-top: 1px solid var(--rule);
  padding: 1.25rem 0;
  margin: 0;
}

dl.pledges dt {
  font-family: var(--letter);
  font-size-adjust: var(--adjust-letter);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.45;
}

dl.pledges dd {
  color: var(--ink-soft);
}

@media (max-width: 44rem) {
  dl.pledges {
    grid-template-columns: 1fr;
  }
  dl.pledges dt {
    padding-bottom: 0.25rem;
  }
  dl.pledges dd {
    border-top: 0;
    padding-top: 0;
  }
}

/* Open source: the one tinted panel on the page. */
.panel {
  background: var(--panel);
  border-radius: 1.5rem;
  padding: clamp(1.75rem, 5vw, 3.25rem);
}

.panel h2 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem);
}

.panel .lede {
  color: var(--ink);
  margin-top: 0;
}

dl.reasons {
  display: grid;
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
  margin: 2.25rem 0 0;
}

dl.reasons dt {
  font-weight: 700;
  font-size: 1.1rem;
}

dl.reasons dd {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
}

@media (min-width: 48rem) {
  dl.reasons {
    grid-template-columns: 1fr 1fr;
  }
}

ul.plain {
  padding-left: 1.2rem;
  margin: 0 0 1.1rem;
}

ul.plain li {
  margin: 0.4rem 0;
}

/* Contact: the address is the thing to find, so it is large. */
.mail {
  font-family: var(--letter);
  font-size-adjust: var(--adjust-letter);
  font-weight: 600;
  font-size: clamp(1.45rem, 1rem + 2.4vw, 2.4rem);
  line-height: 1.3;
  margin: 1.5rem 0 0;
  overflow-wrap: anywhere;
}

.mail a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.sheet {
  background: var(--stationery);
  border: 1px solid var(--rule);
  border-radius: 1.125rem;
  padding: 1.4rem 1.6rem;
  margin: 2.25rem 0 0;
  max-width: 42rem;
}

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

/* A hotline number is read as one unit, so it never breaks at its hyphens. */
.sheet strong {
  white-space: nowrap;
}

footer {
  max-width: var(--wide);
  margin: clamp(4.5rem, 10vw, 7.5rem) auto 0;
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
}

footer p {
  margin: 0;
}

/* Footer links stand on their own, so they keep the 44px target. */
footer p a,
.page-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

footer .langs {
  margin-left: 0;
}

/* Chinese: Han characters set on the em box, not on an x-height, so no font is rescaled there (an x-height match
   would shrink the Han face by about 3 %). */
html:lang(zh) {
  --round: "Site Han", "Site Round", "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --letter: "Site Han", "Site Letter", "Noto Serif KR", Georgia, serif;
  --adjust-round: none;
  --adjust-round-bold: none;
  --adjust-letter: none;
}

p[lang="zh-Hans"] {
  font-family: "Site Han", var(--round);
  font-size-adjust: none;
}
