/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Variables ── */
:root {
  --ui-font: 'keynotesans', sans-serif;
}

body {
  --bg: #ffffff;
  --fg: #000000;
  --line: 1px solid var(--fg);

  background: var(--bg);
  color: var(--fg);
  font-family: var(--ui-font);
  overflow-x: hidden;
}

html {
  background: var(--bg);
}

body.theme-light {
  --bg: #ffffff;
  --fg: #000000;
}

body.theme-dark {
  --bg: #000000;
  --fg: #ffffff;
}

body.theme-yellow {
  --bg: #FFF7BB;
  --fg: #8D7123;
}

body.theme-pink {
  --bg: #EB95FA;
  --fg: #FF3B00;
}

body.theme-blue {
  --bg: #98BEE0;
  --fg: #BADEFF;
}

body.theme-red {
  --bg: #AE0000;
  --fg: #4A78FF;
}

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

/* ── Topbar ── */
#topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;

  width: 100%;
  height: 55px;
  padding: 14px 24px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: var(--bg);
  color: var(--fg);
  border-bottom: var(--line);
  font-family: var(--ui-font);
}

#topbar-right {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}

#topbar-right a {
  font-size: 14px;
  letter-spacing: 1px;
}

#topbar-right a:hover {
  opacity: 0.5;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo {
  display: flex;
  gap: 1px;
  font-family: var(--ui-font);
  font-size: 20px;
  letter-spacing: 2px;
}

.type-foundry {
  font-family: var(--ui-font);
  font-size: 12px;
  letter-spacing: 3px;
}

/* ── Page controls ── */
.page-controls {
  position: fixed;
  top: 59px;
  right: 24px;
  z-index: 999;

  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

.page-controls .download-link {
  background: var(--fg);
  color: var(--bg);
  padding: 10px 24px;
  border-radius: 999px;
  border: none;
  outline: 8px solid var(--bg);
  font-size: 13px;
  letter-spacing: 1px;
  transition: opacity 0.2s ease;
}

.page-controls .download-link:hover,
.theme-toggle:hover {
  opacity: 0.7;
}

/* ── Theme picker ── */
.theme-picker {
  position: relative;
  z-index: 2000;
  display: flex;
  align-items: center;
}

.theme-toggle {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  outline: 8px solid var(--bg);
  background: var(--fg);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.theme-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;

  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;

  padding: 14px 12px;
  background: var(--bg);
  border: var(--line);
  border-radius: 999px;
  outline: 8px solid var(--bg);

  pointer-events: none;
}

.theme-menu.open {
  display: flex;
  pointer-events: auto;
}

.theme-option {
  width: 24px;
  height: 24px;
  border: 1px solid var(--fg);
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
}

.theme-light-option {
  background: linear-gradient(90deg, #ffffff 50%, #000000 50%);
}

.theme-dark-option {
  background: linear-gradient(90deg, #000000 50%, #ffffff 50%);
}

.theme-yellow-option {
  background: linear-gradient(90deg, #FFF7BB 50%, #8D7123 50%);
}

.theme-pink-option {
  background: linear-gradient(90deg, #EB95FA 50%, #FF3B00 50%);
}

.theme-blue-option {
  background: linear-gradient(90deg, #98BEE0 50%, #BADEFF 50%);
}

.theme-red-option {
  background: linear-gradient(90deg, #AE0000 50%, #4A78FF 50%);
}

/* ── Main ── */
main {
  margin-top: 55px;
  padding-bottom: 49px;
}

/* ── Rows ── */
.row {
  display: flex;
  border-bottom: var(--line);
}

.row > .cell {
  flex: 1;
  min-width: 0;
  padding: 28px 32px;
  border-right: var(--line);
}

.row > .cell:last-child {
  border-right: none;
}

/* ── Font content ── */
.hero-name,
.para-text,
.display-text,
.big-letter,
.numbers-text,
.no-numbers {
  font-family: var(--font);
}

.hero-name {
  font-size: clamp(45px, 30vw, 240px);
  line-height: 1.05;
  text-align: center;
  padding: 25px 40px;
  border-bottom: var(--line);
  overflow: hidden;
  white-space: normal;
}

.hero-name-inner {
  display: inline-block;
  font-family: var(--font);
  white-space: nowrap;
  text-align: center;
}

.para-text {
  font-size: clamp(13px, 1.2vw, 17px);
  line-height: 1.55;
}

.display-text {
  font-size: clamp(36px, 6vw, 90px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-align: center;
}

/* ── Big letter rows ── */
.big-letter-row {
  display: grid;
  border-bottom: var(--line);
}

.big-letter-row.cols-2 {
  grid-template-columns: 1fr 1fr;
}

.big-letter-row.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.big-letter-cell {
  position: relative;
  height: 280px;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  border-right: var(--line);
}

.big-letter-cell:last-child {
  border-right: none;
}

.big-letter {
  font-size: clamp(120px, 18vw, 240px);
  line-height: 1;
  user-select: none;
}

.anim-letter {
  display: block;
  line-height: 1;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: contents;
}

/* ── Numbers ── */
.numbers-row {
  padding: 28px 32px;
  border-bottom: var(--line);
}

.numbers-text {
  font-family: var(--font);
  font-size: clamp(28px, 5vw, 90px);
  text-align: center;
}

.no-numbers {
  font-family: var(--font);
  font-size: clamp(20px, 5vw, 50px);
  line-height: 1;
  text-align: center;
  opacity: 0.5;
}

/* ── Footer ── */
.info-footer {
  width: 100vw;
  height: 64px;
  z-index: 100;

  display: flex;
  align-items: stretch;

  background: var(--bg);
  color: var(--fg);
  border-top: var(--line);
  font-family: var(--ui-font);
}

.footer-contact,
.footer-download {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-contact {
  padding: 0 24px;
}

.footer-download {
  padding: 0 32px;
}

.footer-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;

  padding: 0 24px;
  border-right: var(--line);
}

.footer-cell:last-child {
  border-right: none;
}

.footer-label {
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.5;
}

.footer-value {
  font-size: 14px;
  letter-spacing: 0.5px;
}

.footer-download a,
.footer-contact a {
  background: var(--fg);
  color: var(--bg);
  padding: 10px 24px;
  border-radius: 999px;

  font-size: 14px;
  letter-spacing: 1px;
  white-space: nowrap;

  transition: opacity 0.2s ease;
}

.footer-download a:hover,
.footer-contact a:hover {
  opacity: 0.7;
}