:root {
  --ink: #1B2230;      /* text, logo */
  --stone: #EEEFEA;    /* page: tabletop grey-green */
  --slate: #5A6272;    /* secondary text */
  --rule: #CDD1CA;     /* dividers */
  --gold: #C9973F;     /* the die's lit face, nothing else */
  --gold-ink: #8A6420; /* gold dark enough for text and focus */
  --text-2: #2D3443;   /* lede and long text */
  --die-line: #1B2230;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: Literata, Georgia, serif;
}

/* Dark: night at the gaming table. The system setting decides unless the switch has saved a choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E6E8E3; --stone: #121722; --slate: #9AA3B3; --rule: #2A3242; --text-2: #C8CCD4;
    --gold-ink: #E2B866; --die-line: #E6E8E3;
  }
}
:root[data-theme="dark"] {
  --ink: #E6E8E3; --stone: #121722; --slate: #9AA3B3; --rule: #2A3242; --text-2: #C8CCD4;
  --gold-ink: #E2B866; --die-line: #E6E8E3;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--stone); color: var(--ink); font: 400 1.0625rem/1.65 var(--body); }
img, svg { display: block; }
a { color: var(--ink); text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold-ink); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: var(--stone); padding: .5rem .8rem; z-index: 2; }

.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.015em; margin: 0; }
h1 { font-size: clamp(2.1rem, 4vw, 3.5rem); line-height: 1.05; }
h1 span { display: block; }
h2 { font-size: 1.05rem; font-weight: 600; color: var(--slate); letter-spacing: 0; margin-bottom: 1.6rem; }
h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.1; }
p { margin: 0; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding-block: 1.6rem; }
.brand img { height: 44px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: block; } }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.tools { display: flex; align-items: center; gap: 1.1rem; }
.contact-link { font: 600 1rem var(--display); }
.theme { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1.5px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer; padding: 0; }
.theme:hover { border-color: var(--ink); }
.theme svg { width: 1.2rem; height: 1.2rem; grid-area: 1 / 1; }
.theme .moon { fill: currentColor; }
.theme .sun { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme .sun circle { fill: currentColor; stroke: none; }
/* The button shows what you switch to: a moon in light mode, a sun in dark mode. */
.theme .sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme .sun { display: block; } :root:not([data-theme="light"]) .theme .moon { display: none; } }
:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }

/* Hero: the one loud thing is the die drawing itself */
.hero { display: grid; grid-template-columns: 1.7fr 1fr; align-items: center; gap: 3rem; padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3rem, 8vw, 7rem); }
.lede { margin-top: 1.6rem; font-size: 1.2rem; line-height: 1.6; max-width: 34em; color: var(--text-2); }
.die { width: min(100%, 22rem); justify-self: end; overflow: visible; }
.die .edges { fill: none; stroke: var(--die-line); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.die .edges path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.die .face { fill: var(--gold); }
@media (prefers-reduced-motion: no-preference) {
  .die .edges path { stroke-dashoffset: 1; animation: draw 1.1s cubic-bezier(.6, 0, .3, 1) forwards; }
  .die .edges path:nth-child(2) { animation-delay: .35s; }
  .die .edges path:nth-child(3) { animation-delay: .6s; animation-duration: 1.3s; }
  .die .face { opacity: 0; transform-origin: 50px 52px; transform: scale(.6); animation: land .5s cubic-bezier(.2, 1.4, .4, 1) 1.65s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes land { to { opacity: 1; transform: none; } }

/* Businesses: one row each, marked with that business's color */
.businesses { padding-block: 0 clamp(3rem, 7vw, 5rem); }
.biz-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.biz { display: grid; grid-template-columns: 3.4rem minmax(12rem, 1fr) 1.4fr; column-gap: 2rem; row-gap: .4rem; padding: 1.8rem 0 1.9rem; border-bottom: 1px solid var(--rule); align-items: start; }
/* Each business's own logo mark; Ink & Iron swaps to its light icon in light mode. */
.biz-mark { grid-row: span 2; width: 3.4rem; height: 3.4rem; display: grid; place-items: center; }
.biz-mark img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.biz-mark .logo-light, .biz-mark .logo-dark { border-radius: 22%; }
.biz h3 { grid-row: span 2; color: var(--ink); padding-top: .55rem; }
.biz p { max-width: 38em; }
.status { color: var(--slate); font-size: .98rem; }

/* Company facts */
.company { padding-block: 0 clamp(3rem, 7vw, 5rem); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem 2rem; margin: 0; border-top: 2px solid var(--ink); padding-top: 1.4rem; }
.facts dt { font: 600 .9rem var(--display); color: var(--slate); }
.facts dd { margin: .2rem 0 0; font-size: 1.05rem; }
.why { margin-top: 2rem; max-width: 40em; color: var(--text-2); }

/* Contact */
.contact { padding-block: 0 clamp(3rem, 7vw, 5rem); }
.contact-body { border-top: 2px solid var(--ink); padding-top: 1.4rem; }
.contact p { max-width: 40em; }
.mail { font: 600 clamp(1.25rem, 2.6vw, 1.7rem) var(--display); overflow-wrap: anywhere; }
.contact p:first-of-type { display: flex; flex-direction: column; gap: .6rem; }
.small { margin-top: 1.4rem; font-size: .98rem; color: var(--slate); }

footer { display: flex; align-items: center; gap: .9rem; padding-block: 1.6rem 2.4rem; border-top: 1px solid var(--rule); color: var(--slate); font-size: .92rem; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .die { order: -1; width: 9rem; justify-self: start; }
  .biz { grid-template-columns: 3rem 1fr; column-gap: 1rem; }
  .biz-mark { width: 3rem; height: 3rem; grid-row: span 3; }
  .biz h3 { grid-row: auto; padding-top: .45rem; }
  .facts { grid-template-columns: 1fr 1fr; }
  .brand img { height: 36px; }
}
