/* Yloynq, saunas built to order outside Jyväskylä.
   A strict twelve column grid with hairline borders, typewriter labels and folios over a
   Georgia body, pale sky ground, indigo text, one saffron accent. Airy. */

:root {
  --sky: #DCE8F2;
  --sky-2: #E8F0F7;
  --sky-3: #CFDDEA;
  --indigo: #1E2A5A;
  --muted: #53608A;
  --line: #A9BCD3;
  --saffron: #E8A317;

  --type: "American Typewriter", "Courier New", Courier, monospace;
  --body: Georgia, "Times New Roman", serif;

  --wrap: 1240px;
  --pad: clamp(20px, 4.4vw, 64px);
  --gutter: clamp(16px, 2vw, 28px);
  --air: clamp(80px, 10vw, 152px);
  --ease: cubic-bezier(0.25, 0.6, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--sky);
}

body {
  margin: 0;
  background: var(--sky);
  color: var(--indigo);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, table {
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--body);
  font-weight: 400;
  text-wrap: balance;
}

ul, ol {
  padding: 0;
  list-style: none;
}

p, li, dd, td {
  text-wrap: pretty;
}

svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

::selection {
  background: var(--saffron);
  color: var(--indigo);
}

:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
}

.yq-skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--indigo);
  color: var(--sky);
  font-family: var(--type);
  text-decoration: none;
}

.yq-skip:focus {
  top: 12px;
}

.yq-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.yq-wrap {
  width: min(var(--wrap), 100% - var(--pad) * 2);
  margin-inline: auto;
}

.yq-main p a,
.yq-main li a,
.yq-main td a,
.yq-main dd a {
  color: var(--indigo);
  text-decoration: underline;
  text-decoration-color: var(--saffron);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: text-decoration-thickness 180ms ease;
}

.yq-main p a:hover,
.yq-main li a:hover,
.yq-main td a:hover,
.yq-main dd a:hover {
  text-decoration-thickness: 4px;
}

.yq-label {
  display: block;
  font-family: var(--type);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.yq-head {
  position: relative;
  z-index: 40;
  background: var(--sky);
  border-bottom: 1px solid var(--indigo);
}

.yq-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.yq-mark {
  font-family: var(--type);
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  color: var(--indigo);
  text-decoration: none;
}

.yq-mark span {
  color: var(--saffron);
}

.yq-nav {
  display: none;
}

.yq-nav-list {
  display: flex;
  border-left: 1px solid var(--line);
}

.yq-nav-link {
  display: block;
  padding: 22px clamp(14px, 1.8vw, 26px);
  border-right: 1px solid var(--line);
  font-family: var(--type);
  font-size: 0.875rem;
  color: var(--indigo);
  text-decoration: none;
  transition: background-color 180ms ease;
}

.yq-nav-link:hover {
  background: var(--sky-2);
}

.yq-nav-link[aria-current="page"] {
  box-shadow: inset 0 -3px 0 var(--saffron);
}

.yq-menu {
  position: static;
}

.yq-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--indigo);
  font-family: var(--type);
  font-size: 0.875rem;
  color: var(--indigo);
  list-style: none;
  cursor: pointer;
}

.yq-menu-btn::-webkit-details-marker {
  display: none;
}

.yq-menu-btn::marker {
  content: "";
}

.yq-menu-lines {
  position: relative;
  width: 16px;
  height: 8px;
}

.yq-menu-lines::before,
.yq-menu-lines::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 200ms var(--ease), top 200ms var(--ease);
}

.yq-menu-lines::before {
  top: 0;
}

.yq-menu-lines::after {
  top: 6.5px;
}

.yq-menu[open]:not(.is-closing) .yq-menu-lines::before {
  top: 3.25px;
  transform: rotate(45deg);
}

.yq-menu[open]:not(.is-closing) .yq-menu-lines::after {
  top: 3.25px;
  transform: rotate(-45deg);
}

.yq-menu-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 60;
  padding: 0 var(--pad) 24px;
  background: var(--sky-2);
  border-bottom: 1px solid var(--indigo);
}

@media (prefers-reduced-motion: no-preference) {
  .yq-menu[open] .yq-menu-panel {
    animation: yq-in 220ms var(--ease) both;
  }

  .yq-menu.is-closing .yq-menu-panel {
    animation: yq-out 220ms var(--ease) both;
  }
}

@keyframes yq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@keyframes yq-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-6px); }
}

.yq-menu-list li {
  border-bottom: 1px solid var(--line);
}

.yq-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-size: 1.5rem;
  color: var(--indigo);
  text-decoration: none;
}

.yq-menu-link[aria-current="page"] {
  box-shadow: inset 3px 0 0 var(--saffron);
  padding-left: 12px;
}

.yq-chev {
  flex: none;
  width: 0.5em;
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

  .yq-menu {
    display: none;
  }
}

/* ---------- Spreads ---------- */

.yq-spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px var(--gutter);
  padding-top: var(--air);
}

.yq-spread--first {
  padding-top: clamp(28px, 4vw, 56px);
}

.yq-folio {
  font-family: var(--type);
  font-size: clamp(4.5rem, 12vw, 11rem);
  line-height: 0.85;
  color: var(--indigo);
  letter-spacing: -0.04em;
}

.yq-folio span {
  color: var(--saffron);
}

.yq-spread-side {
  min-width: 0;
}

.yq-spread-side .yq-label {
  margin-top: 16px;
}

.yq-spread-body {
  min-width: 0;
  border-top: 1px solid var(--indigo);
  padding-top: 18px;
}

.yq-h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.012em;
  margin: 14px 0 20px;
}

.yq-h2 {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 12px 0 20px;
}

.yq-h3 {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.2;
}

.yq-lead {
  font-size: clamp(1.25rem, 1.9vw, 1.55rem);
  line-height: 1.5;
  max-width: 34em;
}

.yq-prose > * + * {
  margin-top: 1em;
}

.yq-prose p {
  max-width: 36em;
}

.yq-caption {
  margin-top: 10px;
  font-family: var(--type);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}

@media (min-width: 960px) {
  .yq-spread {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .yq-spread-side {
    grid-column: 1 / span 4;
  }

  .yq-spread-body {
    grid-column: 5 / span 8;
  }

  .yq-spread--flip .yq-spread-side {
    grid-column: 9 / span 4;
    grid-row: 1;
  }

  .yq-spread--flip .yq-spread-body {
    grid-column: 1 / span 8;
    grid-row: 1;
  }
}

/* ---------- Hero panel with the drifting drawing ---------- */

.yq-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px var(--gutter);
  padding-top: clamp(24px, 3vw, 44px);
}

.yq-hero-text {
  min-width: 0;
}

.yq-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--indigo);
  background: var(--sky-2);
  min-width: 0;
}

.yq-panel svg {
  width: 100%;
}

.yq-panel-cap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  font-family: var(--type);
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--sky);
}

@media (prefers-reduced-motion: no-preference) {
  .yq-drift {
    transform-box: view-box;
    transform-origin: 55% 60%;
    animation: yq-drift 40s ease-in-out infinite alternate;
  }

  .yq-drift.is-paused {
    animation-play-state: paused;
  }
}

@keyframes yq-drift {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.06) translate(-1.5%, -1%); }
}

@media (min-width: 960px) {
  .yq-hero {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
  }

  .yq-hero-text {
    grid-column: 1 / span 5;
  }

  .yq-panel-wrap {
    grid-column: 6 / span 7;
  }
}

/* ---------- Drawing language ---------- */

.yq-draw .yq-ln {
  fill: none;
  stroke: var(--indigo);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.yq-draw .yq-ln--thin {
  stroke: var(--muted);
  stroke-width: 0.8;
}

.yq-draw .yq-ln--saffron {
  stroke: var(--saffron);
  stroke-width: 1.8;
}

.yq-draw .yq-ln--dash {
  stroke: var(--line);
  stroke-dasharray: 4 5;
}

.yq-draw .yq-fill-sky {
  fill: var(--sky-2);
}

.yq-draw .yq-lab {
  fill: var(--indigo);
  font-family: var(--type);
  font-size: 13px;
}

/* ---------- Ruled lists and steps ---------- */

.yq-rows {
  border-top: 1px solid var(--indigo);
  margin-top: 24px;
}

.yq-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2px 24px;
  padding: 14px 0 13px;
  border-bottom: 1px solid var(--line);
}

.yq-row-k {
  min-width: 0;
}

.yq-row-v {
  font-family: var(--type);
  font-size: 1rem;
  white-space: nowrap;
  text-align: right;
}

.yq-row-note {
  grid-column: 1 / -1;
  font-size: 0.9375rem;
  color: var(--muted);
}

.yq-steps {
  counter-reset: yq-step;
  margin-top: 24px;
  border-top: 1px solid var(--indigo);
}

.yq-step {
  counter-increment: yq-step;
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 4px 16px;
  padding: 18px 0 17px;
  border-bottom: 1px solid var(--line);
}

.yq-step::before {
  content: counter(yq-step, decimal-leading-zero);
  grid-row: 1 / span 2;
  font-family: var(--type);
  font-size: 1rem;
  color: var(--saffron);
  padding-top: 0.15em;
}

.yq-step-title {
  font-size: 1.25rem;
  line-height: 1.3;
}

.yq-step p {
  color: var(--indigo);
  max-width: 36em;
}

.yq-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--indigo);
  border-left: 1px solid var(--line);
  margin-top: 24px;
}

.yq-card {
  padding: 22px 20px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.yq-card .yq-h3 {
  margin: 10px 0 10px;
}

.yq-card-price {
  display: block;
  margin-top: 16px;
  font-family: var(--type);
  font-size: 1.05rem;
}

@media (min-width: 760px) {
  .yq-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.yq-note {
  margin-top: 24px;
  padding: 22px 24px;
  border: 1px solid var(--indigo);
  background: var(--sky-2);
}

.yq-voice {
  font-size: clamp(1.15rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  max-width: 36em;
}

.yq-sign {
  margin-top: 14px;
  font-family: var(--type);
  font-size: 1rem;
  color: var(--muted);
}

.yq-table-wrap {
  overflow-x: auto;
  margin-top: 24px;
}

.yq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.yq-table th,
.yq-table td {
  padding: 12px 14px 11px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: baseline;
}

.yq-table thead th {
  border-bottom: 1px solid var(--indigo);
  font-family: var(--type);
  font-size: 0.8125rem;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--muted);
}

.yq-table tbody th {
  font-weight: 400;
}

.yq-table .yq-num {
  font-family: var(--type);
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 639px) {
  .yq-table--stack thead {
    display: none;
  }

  .yq-table--stack tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    padding: 12px 0 11px;
    border-bottom: 1px solid var(--line);
  }

  .yq-table--stack th,
  .yq-table--stack td {
    padding: 0;
    border: 0;
  }

  .yq-table--stack th {
    grid-column: 1 / -1;
  }

  .yq-table--stack td::before {
    content: attr(data-k) " ";
    font-family: var(--type);
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--muted);
  }

  .yq-table--stack .yq-num {
    text-align: left;
  }
}

/* ---------- Contact ---------- */

.yq-mail {
  display: inline-block;
  max-width: 100%;
  margin: 12px 0 18px;
  font-family: var(--type);
  font-size: clamp(1.8rem, 5vw, 4rem);
  line-height: 1.05;
  color: var(--indigo);
  text-decoration: none;
  overflow-wrap: anywhere;
  border-bottom: 3px solid var(--saffron);
  padding-bottom: 6px;
}

.yq-mail:hover {
  border-bottom-width: 5px;
}

/* ---------- Next ---------- */

.yq-next-list {
  margin-top: 24px;
  border-top: 1px solid var(--indigo);
}

.yq-next-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 21px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  color: var(--indigo);
  text-decoration: none;
}

.yq-next-link small {
  display: block;
  margin-top: 4px;
  font-family: var(--type);
  font-size: 0.875rem;
  color: var(--muted);
}

.yq-next-link .yq-chev {
  width: 0.5em;
  color: var(--saffron);
  transition: transform 220ms var(--ease);
}

.yq-next-link:hover .yq-chev {
  transform: translateX(5px);
}

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

.yq-foot {
  margin-top: var(--air);
  padding: 48px 0 26px;
  border-top: 1px solid var(--indigo);
  background: var(--sky-3);
}

.yq-foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

.yq-foot .yq-label {
  margin-bottom: 10px;
}

.yq-foot p {
  font-size: 1rem;
  color: var(--muted);
}

.yq-foot-list a {
  display: inline-block;
  padding: 3px 0;
  color: var(--indigo);
  text-decoration: none;
}

.yq-foot-list a:hover {
  text-decoration: underline;
  text-decoration-color: var(--saffron);
}

.yq-foot-list a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--saffron);
}

.yq-foot-addr {
  font-style: normal;
}

.yq-foot-base small {
  font-size: inherit;
}

.yq-folio {
  margin: 0;
}

.yq-foot-mail {
  font-family: var(--type);
  font-size: 1.15rem;
  color: var(--indigo);
}

.yq-foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--type);
  font-size: 0.8125rem;
  color: var(--muted);
}

@media (min-width: 900px) {
  .yq-foot-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
  }

  .yq-foot-grid > :nth-child(1) {
    grid-column: 1 / span 5;
  }

  .yq-foot-grid > :nth-child(2) {
    grid-column: 7 / span 3;
  }

  .yq-foot-grid > :nth-child(3) {
    grid-column: 10 / span 3;
  }
}

.yq-gap {
  margin-top: 24px;
}

/* ---------- Quiet fades: visible by default; only blocks below the fold wait ---------- */

.yq-rv {
  transition: opacity 800ms var(--ease);
}

.yq-rv.is-waiting {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }

  .yq-rv.is-waiting {
    opacity: 1;
  }

  .yq-drift {
    animation: none !important;
  }
}

@media print {
  .yq-head {
    display: none !important;
  }

  .yq-rv.is-waiting {
    opacity: 1 !important;
  }
}
