/* ==========================================================================
   Muurauspalvelu Isola Oy — tyylit
   Värit MPI-lippisvedoksesta (grafiitti, valkoinen, musta) ja tulisijan hehkusta
   (tiilenpunainen korostus). Otsikot Russo One (lähellä logon alarivin kirjaimia),
   leipäteksti Rubik. Fontit omalta palvelimelta, SIL Open Font License 1.1.
   ========================================================================== */

@font-face {
  font-family: "Russo One";
  src: url("../fonts/russo-one-400.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: "Rubik";
  src: url("../fonts/rubik-400.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: "Rubik";
  src: url("../fonts/rubik-600.woff2") format("woff2");
  font-weight: 600;
  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;
}

:root {
  /* Grafiitti lippiksestä. Kontrastit valkoiseen: --ink-900 16,7:1, --ember-600 5,4:1. */
  --ink-950: #141517;
  --ink-900: #1c1e20;
  --ink-800: #26292c;
  --ink-700: #34383c;
  --ink-600: #45494d;
  --stone-50: #f6f4f0;
  --stone-100: #ece8e1;
  --stone-200: #ddd7cd;
  --white: #fff;

  /* Tiilenpunainen: --ember-600 painikkeissa (valkoinen teksti), --ember-400 korostuksena tummalla (5,6:1). */
  --ember-700: #a83d25;
  --ember-600: #b8442a;
  --ember-400: #e8734a;

  --text: var(--ink-900);
  --muted: #5a5f64;
  --text-on-dark: #e6e7e8;
  --muted-on-dark: #b5b8bb;
  --line-on-dark: rgba(255, 255, 255, 0.12);

  --font-display: "Russo One", "Arial Black", system-ui, sans-serif;
  --font-body: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 6px;
  --header-h: 68px;

  /* Tiilisaumat tummien osioiden taustalla (data-URI, CSP: img-src data:). */
  --brick-lines: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40'%3E%3Cpath d='M0 .5h80M0 20.5h80M.5 0v20M40.5 0v20M20.5 20v20M60.5 20v20' stroke='%23fff' stroke-opacity='.06' fill='none'/%3E%3C/svg%3E");
}

/* --- Perustyylit ------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Footer pysyy alareunassa myös lyhyellä 404-sivulla. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.005em;
  overflow-wrap: break-word;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

svg {
  display: block;
}

:focus-visible {
  outline: 3px solid var(--ember-400);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--white);
  color: var(--ink-900);
  font-weight: 600;
  border-radius: var(--radius);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

/* --- Painikkeet -------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.8em 1.25em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--sm {
  padding: 0.55em 0.95em;
  font-size: 0.95rem;
}

.btn--lg {
  padding: 0.95em 1.45em;
  font-size: 1.05rem;
}

.btn--primary {
  background: var(--ember-600);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--ember-700);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}

.btn--ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

/* --- Header ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 30, 32, 0.94);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

@supports (backdrop-filter: blur(8px)) {
  .site-header {
    background: rgba(28, 30, 32, 0.82);
    backdrop-filter: blur(10px);
  }
}

.site-header.is-scrolled {
  border-bottom-color: var(--line-on-dark);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
  text-decoration: none;
  margin-right: auto;
}

.brand__mark {
  height: 28px;
  aspect-ratio: 92.75 / 32.36;
}

.brand__name {
  display: none;
  height: 12px;
  aspect-ratio: 152.49 / 11.02;
  padding-left: 14px;
  border-left: 1px solid var(--line-on-dark);
  box-sizing: content-box;
}

.site-nav {
  display: none;
  gap: 28px;
}

.site-nav a {
  color: var(--text-on-dark);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--white);
  border-bottom-color: var(--ember-400);
}

.site-header__number {
  display: none;
}

@media (min-width: 600px) {
  .brand__name {
    display: block;
  }
}

@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }

  .site-header__number {
    display: inline;
  }
}

/* --- Hero -------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(40px, 7vw, 104px) clamp(48px, 7vw, 96px);
  color: var(--white);
  background:
    radial-gradient(60% 70% at 78% 62%, rgba(232, 115, 74, 0.16), transparent 70%),
    var(--ink-900);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--brick-lines);
  -webkit-mask-image: linear-gradient(115deg, transparent 35%, #000 85%);
  mask-image: linear-gradient(115deg, transparent 35%, #000 85%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--ember-400);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero__title {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.08;
  max-width: 14em;
}

/* Oma rivinsä; kapealla näytöllä katkeaa vain yhdysmerkin kohdalta. */
.hero__accent {
  display: inline-block;
  color: var(--ember-400);
}

.hero__lead {
  margin-top: 22px;
  max-width: 34em;
  color: var(--text-on-dark);
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__area {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  color: var(--muted-on-dark);
  font-size: 0.98rem;
}

.hero__area .icon {
  color: var(--ember-400);
}

.hero__art {
  justify-self: center;
  width: min(100%, 250px);
}

.fireplace {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.45));
}

.flame {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .flame {
    animation: flicker 2.2s ease-in-out infinite alternate;
  }

  .flame--left {
    animation-duration: 1.7s;
    animation-delay: -0.6s;
  }

  .flame--right {
    animation-duration: 1.9s;
    animation-delay: -1.1s;
  }

  .flame--core {
    animation-duration: 1.5s;
    animation-delay: -0.3s;
  }
}

@keyframes flicker {
  0% {
    transform: scale(1, 1);
  }
  40% {
    transform: scale(0.95, 1.06) skewX(-1.5deg);
  }
  70% {
    transform: scale(1.03, 0.96) skewX(1deg);
  }
  100% {
    transform: scale(0.98, 1.03);
  }
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
    gap: 56px;
  }

  .hero__art {
    width: min(100%, 400px);
    justify-self: end;
  }
}

/* --- Osiot ------------------------------------------------------------- */

.section {
  padding-block: clamp(56px, 9vw, 112px);
}

.section--light {
  background: var(--stone-50);
  color: var(--text);
}

.section--dark {
  position: relative;
  background: var(--ink-800);
  color: var(--white);
}

.section--dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--brick-lines);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 80%);
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
  pointer-events: none;
}

.section__title {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
}

.section__title::after {
  content: "";
  display: block;
  width: 56px;
  height: 6px;
  margin-top: 18px;
  background: var(--ember-600);
  border-radius: 1px;
}

/* --- Palvelut ---------------------------------------------------------- */

.services {
  display: grid;
  gap: 20px;
  margin-top: clamp(32px, 4vw, 48px);
}

.service {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(24px, 3vw, 32px);
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-top: 4px solid var(--ink-900);
  border-radius: var(--radius);
}

.service__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 10px;
  background: var(--ink-900);
  color: var(--ember-400);
  border-radius: var(--radius);
}

.service__icon .icon {
  width: 28px;
  height: 28px;
}

.service__title {
  font-size: 1.4rem;
}

.service__note {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--stone-100);
  color: var(--muted);
  font-size: 0.95rem;
}

@media (min-width: 860px) {
  .services {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

/* --- Yhteystiedot ------------------------------------------------------ */

.contact__inner {
  position: relative;
  display: grid;
  gap: 36px;
}

.contact__lead {
  margin-top: 22px;
  color: var(--text-on-dark);
  font-size: 1.15rem;
}

.contact__person {
  margin-top: 24px;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.contact__person span {
  display: block;
  margin-top: 2px;
  color: var(--muted-on-dark);
  font-family: var(--font-body);
  font-size: 0.98rem;
}

.contact__list {
  display: grid;
  gap: 14px;
}

.contact-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 16px;
  align-items: center;
  padding: 20px 22px;
  background: rgba(20, 21, 23, 0.55);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
}

.contact-card__icon {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  color: var(--ember-400);
}

.contact-card__label {
  color: var(--muted-on-dark);
  font-size: 0.9rem;
}

.contact-card__value {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

a.contact-card__value {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 4px;
}

a.contact-card__value:hover {
  text-decoration-color: var(--ember-400);
}

.contact-card__value--big {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  line-height: 1.2;
}

a.contact-card__value--big {
  text-decoration-color: transparent;
}

@media (min-width: 900px) {
  .contact__inner {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 56px;
    align-items: start;
  }
}

/* --- Footer ------------------------------------------------------------ */

.site-footer {
  padding-block: 36px;
  background: var(--ink-950);
  color: var(--muted-on-dark);
  font-size: 0.92rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
}

.brand--footer {
  margin-right: 0;
}

.brand--footer .brand__mark {
  height: 24px;
}

.brand--footer .brand__name {
  display: block;
  height: 10px;
}

.site-footer a:not(.brand) {
  color: var(--text-on-dark);
  text-underline-offset: 3px;
}

.site-footer a:not(.brand):hover {
  color: var(--white);
}

/* --- 404 --------------------------------------------------------------- */

.notfound {
  min-height: 60vh;
  display: grid;
  align-content: center;
}

.notfound__text {
  margin-top: 22px;
  max-width: 34em;
  color: var(--text-on-dark);
  font-size: 1.1rem;
}

.nowrap {
  white-space: nowrap;
}
