/* funtrix.cc: one static page (docs/COMPANY_SITE.md). No scripts, no web fonts. */
:root {
  --bg: #FBF7F2;
  --card: #FFFFFF;
  --ink: #1B2A4E;
  --soft: #55607C;
  --line: #E9E1D6;
  --accent: #FF6B4A;
  --accent-ink: #C7401F; /* coral dark enough for text on the light background */
  --mark-body: #1B2A4E;
  --mark-smile: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1730;
    --card: #17223F;
    --ink: #F3EFE8;
    --soft: #A9B2CB;
    --line: #26335A;
    --accent-ink: #FF8E73;
    --mark-body: #F3EFE8;
    --mark-smile: #1B2A4E;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", "Hiragino Sans", "Yu Gothic UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK KR", sans-serif;
  overflow-wrap: break-word;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
header.top, main, footer {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
:lang(ko) { word-break: keep-all; } /* Korean breaks at spaces; Japanese and Chinese must not */
a { color: var(--accent-ink); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* logo: the colours come from here so it follows the theme */
.ink, .body { fill: var(--ink); }
.body { fill: var(--mark-body); }
.accent { fill: var(--accent); }
.smile { stroke: var(--mark-smile); }

header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .mark { width: 44px; height: auto; }
.brand .word { height: 26px; width: auto; }
.lang { position: relative; font-size: 15px; font-weight: 600; }
.lang summary {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px 6px 11px;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { border-color: var(--accent); }
.lang summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.globe { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.chev { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lang[open] .chev { transform: rotate(180deg); }
.lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 2;
  min-width: 100%;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.12);
}
.lang li a { display: block; padding: 8px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.lang li a:hover, .lang li a:focus-visible { background: var(--bg); color: var(--accent-ink); }

main { flex: 1; }
.hero { padding: 9vh 0 7vh; text-align: center; }
.mark.big { width: min(240px, 52vw); height: auto; }
h1 {
  font-size: clamp(30px, 5.6vw, 50px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 34px auto 18px;
  max-width: 16em;
  text-wrap: balance;
}
.lead { color: var(--soft); font-size: clamp(17px, 2.2vw, 19px); max-width: 34em; margin: 0 auto; text-wrap: pretty; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-bottom: 8vh; }
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: 22px; padding: 26px 28px 28px; }
.card h2 { font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 10px; }
.card p { margin: 0; color: var(--soft); }
.mail {
  display: inline-block;
  margin-top: 16px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 3px solid var(--accent);
}
.mail:hover { color: var(--accent-ink); }

footer { border-top: 1.5px solid var(--line); padding-top: 22px; padding-bottom: 30px; font-size: 14px; color: var(--soft); }
footer p { margin: 0 0 4px; }
footer a { color: inherit; }

@media (max-width: 640px) {
  header.top, main, footer { padding-left: 16px; padding-right: 16px; }
  .cards { grid-template-columns: 1fr; }
  .hero { padding: 6vh 0 6vh; }
}
@media (prefers-reduced-motion: no-preference) {
  .mark.big { animation: bob 5s ease-in-out infinite; }
  @keyframes bob { 50% { transform: translateY(-8px); } }
}
