/* FireCake Studio: yhteiset tyylit kaikille sivuille.
   Ilme FireNutsCake-brändin mukaan: tumma pohja, kromi, teräskehykset, punainen ja liekinkeltainen.
   Värit ja fontit ovat alla tokeneina. Vaihda ne tästä, niin koko sivusto seuraa. */

@font-face {
  font-family: "Kanit";
  src: url("fonts/kanit-latin-900-italic.woff2") format("woff2");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  src: url("fonts/barlow-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  src: url("fonts/barlow-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Layout: one 70rem column. Studio hero is asymmetric (text 7/12, mascot badge 5/12);
   the links page is a single 32rem column of steel-framed plates.
   One dark world on purpose: the brand lives on black, so there is no light theme. */
:root {
  --bg: #141311;         /* page: warm near-black, the badge's charcoal family */
  --bg-2: #1E1C18;       /* alternating bands */
  --plate: #0A0A09;      /* black plates inside steel frames */
  --ink: #F5F2EC;        /* text */
  --ink-soft: #BDB6AA;   /* secondary text */
  --line: #38352F;       /* hairlines */
  --red: #FF0543;        /* brand crimson (badge outline) */
  --red-deep: #B8002E;   /* red shadow and pressed state */
  --flame: #FFBC49;      /* brand yellow (badge circle), focus ring */
  --on-red: #FFFFFF;
  --chrome: linear-gradient(180deg, #FFFFFF 0%, #E9EDF1 38%, #8B939D 50%, #F4F6F8 56%, #B9C0C8 100%);
  --steel: linear-gradient(180deg, #F7F8FA 0%, #AAB1BA 44%, #5E656F 52%, #DCE0E5 62%, #8C939C 100%);
  --frame-shadow: 0 0 0 2px #000, 0 14px 30px -16px rgb(0 0 0 / .9);

  --font-display: "Kanit", "Arial Black", Impact, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: .9rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.7rem, 1.3rem + 1.7vw, 2.5rem);
  --step-3: clamp(2.4rem, 1.35rem + 4.3vw, 4.7rem);
  --radius: 14px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
picture { display: block; }
svg { max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--flame); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--flame); outline-offset: 3px; }

/* Chrome lettering, as on the badge and the channel panels.
   The dark band at 50–56 % sits across the middle of Kanit's capitals (measured: caps 20–84 % of a line). */
.chrome {
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 14px rgb(255 5 67 / .38));
  padding-right: .14em; /* room for the italic overhang, which would otherwise lose its paint */
}
/* Every line of a heading gets its own band (1lh tiles). Browsers without lh show one band per heading. */
h1.chrome, h2.chrome, h3.chrome, .link strong.chrome {
  background-size: 100% 1lh;
  background-repeat: repeat-y;
  padding-bottom: .12em;
}
@media (forced-colors: active) {
  .chrome { background: none; color: CanvasText; filter: none; }
}

.skip {
  position: absolute;
  left: max(16px, env(safe-area-inset-left, 0px));
  top: -4rem;
  z-index: 20;
  padding: .6rem 1rem;
  border-radius: 999px;
  background: var(--flame);
  color: #000;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 1rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wrap {
  max-width: 70rem;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Header */
.site-header { padding-block: 1rem; border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}
.brand img { width: 3rem; height: auto; }
.nav { display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; font-weight: 700; }
.nav a {
  color: var(--ink);
  text-decoration: none;
  padding-block: .3rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--red); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 3rem;
  padding: .65rem 1.35rem;
  border: 3px solid transparent;
  border-radius: 12px;
  background: linear-gradient(var(--plate), var(--plate)) padding-box, var(--steel) border-box;
  box-shadow: var(--frame-shadow);
  color: var(--ink);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { color: var(--ink); box-shadow: 0 0 0 2px #000, 0 0 18px rgb(255 5 67 / .45); }
.btn-primary {
  background: linear-gradient(var(--red), var(--red)) padding-box, linear-gradient(180deg, #FF5C80, var(--red-deep)) border-box;
  color: var(--on-red);
}
.btn-primary:hover { color: var(--on-red); box-shadow: 0 0 0 2px #000, 0 0 22px rgb(255 5 67 / .6); }
.btn svg { width: 1.35rem; height: 1.35rem; flex: none; }

/* Hero */
.hero { position: relative; padding-block: clamp(1.75rem, 5vw, 4rem) clamp(2.5rem, 6vw, 4.5rem); overflow: hidden; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
}
.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-style: italic;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.005em;
}
.lead { max-width: 40ch; margin: 0 0 1.9rem; color: var(--ink-soft); font-size: var(--step-1); line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-art { position: relative; margin: 0; justify-self: center; width: min(100%, 22rem); text-align: center; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: 8% 4% 14%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 188 73 / .35), rgb(255 5 67 / .22) 55%, transparent 75%);
  filter: blur(6px);
}
.hero-art img { display: block; width: 100%; animation: leiju 6s ease-in-out infinite; }
.hero-art figcaption { margin-top: .5rem; color: var(--flame); font-weight: 700; }
@keyframes leiju {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-1.5deg); }
}

/* Sections */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.band { background: var(--bg-2); border-block: 1px solid var(--line); }
.section h2 {
  margin: 0 0 .5rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-style: italic;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.section-intro { max-width: 60ch; margin: 0 0 1.75rem; color: var(--ink-soft); }

/* What we make: six red dice */
.make-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 2rem;
}
.make-head .section-intro { margin-bottom: 0; }
.roll { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.roll output { min-height: 1.6em; color: var(--flame); font-weight: 700; }
.faces {
  --face-pad: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  margin: 0 calc(-1 * var(--face-pad));
  padding: 0;
  list-style: none;
}
.face {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  padding: var(--face-pad);
  border: 3px solid transparent;
  border-radius: var(--radius);
  transition: background-color .3s ease, box-shadow .3s ease;
}
.face h3 { margin: .1rem 0 .2rem; font-size: var(--step-1); font-weight: 700; line-height: 1.25; }
.face p { margin: 0; color: var(--ink-soft); }
.pips { width: 3.1rem; height: 3.1rem; filter: drop-shadow(0 3px 0 #000); }
.pips .pinta { fill: var(--red); stroke: #000; stroke-width: 6; }
.pips .pippi { fill: #FFFFFF; }
.face.is-rolled {
  background: linear-gradient(var(--plate), var(--plate)) padding-box, var(--steel) border-box;
  box-shadow: var(--frame-shadow);
}
.face.is-rolled .pips .pinta { fill: var(--flame); }
.face.is-rolled .pips .pippi { fill: #000; }
.is-rolling .noppa { animation: kieri .7s cubic-bezier(.3, 1.35, .5, 1); }
@keyframes kieri {
  0% { transform: rotate(0deg) scale(1); }
  55% { transform: rotate(420deg) scale(1.15); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Projects: steel-framed plates, like the channel's panels */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.plate {
  border: 3px solid transparent;
  border-radius: var(--radius);
  background: linear-gradient(var(--plate), var(--plate)) padding-box, var(--steel) border-box;
  box-shadow: var(--frame-shadow), inset 0 0 0 2px rgb(255 5 67 / .5);
}
.project { display: flex; flex-direction: column; gap: .8rem; padding: 1.5rem; }
.project h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-style: italic;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}
.project p { margin: 0; color: var(--ink-soft); }
.project .more { margin-top: auto; font-weight: 700; }
.status {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: .5rem;
  padding: .2rem .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 255 255 / .06);
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: 700;
}
.status::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }
.status.is-baking::before { background: var(--flame); box-shadow: 0 0 8px var(--flame); }

/* About and contact */
.prose { max-width: 62ch; }
.prose p { margin: 0 0 1rem; }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.25rem; }
.email {
  color: var(--ink);
  font-size: clamp(1.3rem, 1rem + 1.3vw, 1.85rem);
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.email:hover { color: var(--flame); }

/* Footer */
.site-footer { padding-block: 1.5rem 2.5rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: var(--step--1); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }

/* Links page */
.links-page .wrap { max-width: 32rem; padding-block: clamp(1.75rem, 7vw, 3rem) 2.5rem; }
.lp-head { display: grid; justify-items: center; gap: .3rem; margin-bottom: 1.75rem; text-align: center; }
.lp-badge {
  position: relative;
  width: 12rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
}
.lp-badge::before {
  content: "";
  position: absolute;
  inset: 4%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 188 73 / .4), rgb(255 5 67 / .25) 60%, transparent 78%);
  filter: blur(8px);
}
.lp-badge img { display: block; width: 100%; }
.lp-badge:hover .noppa { transform: rotate(-5deg) scale(1.03); transition: transform .2s ease; }
/* The badge already carries the name in chrome, so the page's h1 is for screen readers only. */
.lp-head .tagline { margin: .7rem 0 0; color: var(--flame); font-size: var(--step-1); font-weight: 700; line-height: 1.3; }
.lp-head .by { margin: 0; color: var(--ink-soft); font-size: var(--step--1); }
.lp-head .role { min-height: 3.2em; max-width: 30ch; margin: .5rem 0 0; color: var(--ink); font-weight: 700; }
.link-list { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; }
.link {
  display: grid;
  grid-template-columns: 2.8rem minmax(0, 1fr) auto;
  align-items: center;
  gap: .9rem;
  padding: .75rem 1rem;
  border: 3px solid transparent;
  border-radius: var(--radius);
  background: linear-gradient(var(--plate), var(--plate)) padding-box, var(--steel) border-box;
  box-shadow: var(--frame-shadow), inset 0 0 0 2px rgb(255 5 67 / .45);
  color: var(--ink);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.link:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 0 0 2px #000, inset 0 0 0 2px var(--red), 0 0 22px rgb(255 5 67 / .45); }
.link .ico {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 2px solid #000;
  border-radius: 10px;
  background: var(--red);
  color: #FFFFFF;
}
.link .ico svg { width: 1.4rem; height: 1.4rem; }
.link .txt { min-width: 0; }
.link strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}
.link .sub { display: block; color: var(--ink-soft); font-size: var(--step--1); line-height: 1.4; overflow-wrap: anywhere; }
.link .tag {
  padding: .15rem .6rem;
  border: 1px solid #000;
  border-radius: 999px;
  background: var(--flame);
  color: #000;
  font-size: .8rem;
  font-weight: 700;
}
.link.is-primary {
  background: linear-gradient(var(--red), var(--red)) padding-box, linear-gradient(180deg, #FF5C80, var(--red-deep)) border-box;
  box-shadow: var(--frame-shadow);
  color: #000;
}
.link.is-primary:hover { color: #000; }
.link.is-primary .sub { color: #000; }
.link.is-primary .ico { background: #000; color: var(--red); }
.link.is-primary:hover { box-shadow: 0 0 0 2px #000, 0 0 26px rgb(255 5 67 / .65); }
.lp-foot { margin-top: 2rem; color: var(--ink-soft); font-size: var(--step--1); text-align: center; }

/* 404 */
.lost { padding-block: clamp(3rem, 12vw, 7rem); text-align: center; }
.lost .wrap { display: grid; justify-items: center; gap: 1rem; }
.lost img { width: 9rem; transform: rotate(-10deg); }
.lost h1 { margin: 0; font-family: var(--font-display); font-size: var(--step-2); font-style: italic; font-weight: 900; line-height: 1.08; text-transform: uppercase; }
.lost p { margin: 0; color: var(--ink-soft); }

@media (max-width: 60rem) {
  .faces { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 52rem) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-art { order: -1; width: min(62%, 14rem); }
  .hero-art figcaption { font-size: var(--step--1); }
}
@media (max-width: 46rem) {
  .projects { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 38rem) {
  .faces { --face-pad: .75rem; grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art img, .is-rolling .noppa { animation: none; }
  .link, .face, .lp-badge:hover .noppa { transition: none; }
  .link:hover { transform: none; }
}
