@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500&family=Spectral:ital,wght@0,300;0,400;1,300&display=swap');

:root,
html[data-theme="light"] {
  color-scheme: light;
  --page: #e8dfd1;
  --paper: #f6efe4;
  --paper-alt: #eee4d5;
  --footer: #b8bea7;
  --footer-deep: #aab19b;
  --ink: #315e49;
  --body: #2c4036;
  --muted: #777268;
  --line: rgba(49,94,73,.48);
  --card: rgba(255,255,255,.24);
  --accent-soft: rgba(136,153,128,.20);
  --accent-warm: rgba(192,167,137,.18);
  --logo-display: url("images/katkoviivoja-logo-light.png");
  --texture-opacity: .04;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page: #17302a;
  --paper: #19342d;
  --footer: #10271f;
  --ink: #efe8dc;
  --body: #efe8dc;
  --muted: #b9bead;
  --line: rgba(239,232,220,.62);
  --card: rgba(255,255,255,.045);
  --paper-alt: #1d3932;
  --footer-deep: #0d211a;
  --accent-soft: rgba(239,232,220,.04);
  --accent-warm: rgba(239,232,220,.025);
  --logo-display: url("images/katkoviivoja-logo-dark.png");
  --texture-opacity: .025;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--page); }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: "Jost", sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 18% 8%, rgba(255,255,255,.48), transparent 25rem),
    radial-gradient(ellipse at 82% 22%, var(--accent-warm), transparent 30rem),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-alt) 72%, var(--paper) 100%);
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--texture-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.site-header {
  min-height: 4.7rem;
  padding: 1rem 3rem .75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}

.brand {
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-name {
  color: var(--ink);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .38em;
}

.header-right,
.site-nav {
  display: flex;
  align-items: center;
}

.header-right { gap: 1.35rem; }
.site-nav { gap: 2rem; flex-wrap: wrap; justify-content: flex-end; }

.site-nav a {
  padding: .2rem 0 .35rem;
  color: var(--body);
  border-bottom: 1px solid transparent;
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .04em;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

.theme-toggle {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.moon-icon { display: none; }
html[data-theme="dark"] .sun-icon { display: none; }
html[data-theme="dark"] .moon-icon { display: block; }

main { flex: 1; position: relative; z-index: 2; }

.home-main {
  display: grid;
  place-items: center;
  padding: 2.2rem 2rem 3.2rem;
}

.hero {
  width: min(46rem, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero h1 {
  margin: 0 0 .7rem;
  color: var(--ink);
  font-size: clamp(2rem, 4.3vw, 3.15rem);
  font-weight: 400;
  letter-spacing: .34em;
  line-height: 1;
  text-indent: .34em;
}

.hero-logo {
  width: clamp(12.2rem, 19vw, 15.2rem);
  aspect-ratio: 1;
  display: block;
  margin: 0;
}

.theme-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.theme-logo-dark { display: none; }
html[data-theme="dark"] .theme-logo-light { display: none; }
html[data-theme="dark"] .theme-logo-dark { display: block; }

.service-name {
  margin: .45rem 0 0;
  color: var(--ink);
  font-size: .85rem;
  font-weight: 400;
  letter-spacing: .54em;
  text-indent: .54em;
}

.hero-rule {
  width: 2rem;
  height: 1px;
  margin: 1rem 0 .95rem;
  background: var(--ink);
}

.hero blockquote {
  margin: 0;
  color: var(--body);
  font-family: "Spectral", serif;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  font-style: italic;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 3.4rem;
  margin-top: 1.75rem;
}

.hero-actions > a,
.contact-panel summary {
  position: relative;
  display: inline-block;
  padding: 0 0 .38rem;
  border: 0;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .2em;
  line-height: 1.25;
  text-decoration: none;
  list-style: none;
  white-space: nowrap;
}

.contact-panel { position: relative; }
.contact-panel summary::-webkit-details-marker { display: none; }

.hero-actions > a::after,
.contact-panel summary::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}

.hero-actions > a:hover::after,
.hero-actions > a:focus-visible::after,
.contact-panel summary:hover::after,
.contact-panel summary:focus-visible::after {
  transform: scaleX(1);
}

.contact-panel-content {
  position: absolute;
  top: calc(100% + .7rem);
  left: 50%;
  z-index: 30;
  width: max-content;
  min-width: 15rem;
  padding: .45rem;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 1rem 2rem rgba(0,0,0,.13);
  transform: translateX(-50%);
  text-align: left;
}

.contact-panel-content a {
  display: block;
  padding: .65rem .75rem;
  color: var(--body);
  font-size: .75rem;
  text-decoration: none;
}

.contact-panel-content a + a { border-top: 1px solid var(--line); }
.contact-panel-content a:hover,
.contact-panel-content a:focus-visible { color: var(--ink); }

/* The sculpted footer from the approved example */
.site-footer {
  min-height: 7.2rem;
  position: relative;
  z-index: 1;
  margin-top: auto;
  background: var(--footer);
  color: var(--ink);
}

.footer-wave {
  position: absolute;
  top: -2.35rem;
  left: -5%;
  width: 110%;
  height: 4rem;
  background: var(--footer);
  clip-path: polygon(
    0 42%,
    13% 62%,
    28% 68%,
    43% 53%,
    57% 58%,
    72% 82%,
    86% 92%,
    100% 61%,
    100% 100%,
    0 100%
  );
}

.footer-content {
  min-height: 7.2rem;
  padding: 3.2rem 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: .55rem;
  text-align: center;
}

.footer-content p {
  margin: 0;
  font-size: .56rem;
  font-weight: 400;
  letter-spacing: .13em;
}

.footer-content span { margin: 0 .65rem; }

/* Interior pages use the same visual language */
.inner-main {
  width: min(74rem, 100%);
  margin: 0 auto;
  padding: 3.2rem 3rem 7rem;
}

.back-link,
.page-kicker {
  color: var(--ink);
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .18em;
  text-decoration: none;
  text-transform: uppercase;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  padding-bottom: .2rem;
  border-bottom: 1px solid var(--line);
}

.page-kicker {
  margin: 0 0 2rem;
  text-align: center;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 2rem;
}

.service-card,
.about-photo {
  position: relative;
  border: 1px solid var(--line);
  background: var(--card);
}

.service-card {
  min-height: 27rem;
  padding: 2.6rem;
  display: flex;
  flex-direction: column;
}

.service-card h2,
.about-copy h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Spectral", serif;
  font-weight: 300;
}

.service-card h2 { font-size: 1.9rem; }
.eyebrow {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: .62rem;
  letter-spacing: .25em;
  text-transform: uppercase;
}
.rule,
.short-rule { height: 1px; background: var(--line); }
.rule { margin: 1.5rem 0; }
.short-rule { width: 2.5rem; margin: 1.5rem 0; }
.service-description {
    flex: 1;
    line-height: 1.8;
    text-align: justify;
    hyphens: auto;
}.service-detail {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .08em;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(18rem,42%) 1fr;
  gap: 3rem;
  align-items: stretch;
}

.about-photo {
  min-height: 31rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(49,94,73,.06), rgba(49,94,73,.18));
}

.photo-placeholder { color: var(--muted); text-align: center; }
.photo-placeholder svg { width: 2.6rem; height: 2.6rem; }
.photo-placeholder p { font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; }
.about-copy { align-self: center; }
.about-copy h1 { font-size: 2.25rem; }
.about-copy p {
    line-height: 1.8;
    text-align: justify;
    hyphens: auto;
}
.credentials {
  margin-top: 1.5rem !important;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .1em;
}

@media (max-width: 52rem) {
  .site-header { padding-inline: 1.4rem; }
  .site-nav { gap: 1rem; }
  .home-main { padding-top: 3.5rem; }
  .services-grid,
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 40rem) {
  .site-header {
    align-items: flex-start;
    gap: 1rem;
  }

  .brand-name {
    font-size: .78rem;
    letter-spacing: .25em;
  }

  .header-right {
    align-items: flex-start;
    gap: .7rem;
  }

  .site-nav {
    max-width: 17rem;
    gap: .5rem .8rem;
  }

  .site-nav a { font-size: .6rem; }
  .theme-toggle { width: 2rem; height: 2rem; }

  .home-main { padding: 3rem 1.25rem 5.5rem; }
  .hero h1 {
    font-size: 1.65rem;
    letter-spacing: .24em;
    text-indent: .24em;
  }
  .hero-logo { width: 13rem; }
  .service-name {
    font-size: .68rem;
    letter-spacing: .38em;
    text-indent: .38em;
  }
  .hero-actions { gap: 2rem; }
  .inner-main { padding: 2.2rem 1.25rem 6rem; }
  .service-card { min-height: 0; padding: 1.6rem; }
  .footer-content span { display: block; height: .35rem; }
}

@media (max-width: 27rem) {
  .site-header { padding: 1rem; }
  .site-nav { display: none; }
  .hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}


/* Refined light-theme depth and vertical compactness */
html[data-theme="light"] .site-header {
  background: rgba(246,239,228,.54);
  backdrop-filter: blur(.35rem);
}

html[data-theme="light"] .hero::before,
html[data-theme="light"] .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

html[data-theme="light"] .hero::before {
  width: 18rem;
  height: 18rem;
  left: -10rem;
  top: 4rem;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
}

html[data-theme="light"] .hero::after {
  width: 16rem;
  height: 16rem;
  right: -9rem;
  top: 1rem;
  background: radial-gradient(circle, var(--accent-warm), transparent 72%);
}

html[data-theme="light"] .site-footer {
  background:
    linear-gradient(180deg, var(--footer), var(--footer-deep));
}

.hero {
  position: relative;
}

@media (min-width: 48rem) and (min-height: 42rem) {
  .page-shell {
    min-height: 100svh;
  }

  .home-main {
    min-height: calc(100svh - 11.9rem);
  }
}

@media (min-width: 48rem) and (max-height: 50rem) {
  .site-header {
    min-height: 4.25rem;
    padding-top: .75rem;
    padding-bottom: .55rem;
  }

  .home-main {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 3.4vw, 2.6rem);
    margin-bottom: .45rem;
  }

  .hero-logo {
    width: clamp(10.8rem, 16vw, 13.2rem);
  }

  .service-name {
    margin-top: .2rem;
  }

  .hero-rule {
    margin-top: .7rem;
    margin-bottom: .7rem;
  }

  .hero blockquote {
    font-size: .98rem;
    line-height: 1.4;
  }

  .hero-actions {
    margin-top: 1.25rem;
  }

  .site-footer {
    min-height: 6.2rem;
  }

  .footer-wave {
    top: -1.9rem;
    height: 3.2rem;
  }

  .footer-content {
    min-height: 6.2rem;
    padding-top: 2.6rem;
    padding-bottom: .7rem;
  }
}

@media (max-width: 40rem) {
  .home-main {
    padding-top: 2rem;
    padding-bottom: 4.2rem;
  }

  .hero-logo {
    width: 11.5rem;
  }
}


/* v2: equal-height home actions and guaranteed header links */
.hero-actions {
  align-items: center;
}

.hero-actions > a,
.contact-panel,
.contact-panel summary {
  min-height: 1.75rem;
}

.hero-actions > a,
.contact-panel summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.contact-panel {
  margin: 0;
  padding: 0;
}

.contact-panel summary {
  box-sizing: border-box;
}

/* Keep the essential page links visible on narrow phones too. */
@media (max-width: 27rem) {
  .site-nav {
    display: flex;
    max-width: 12rem;
    gap: .35rem .7rem;
  }

  .site-nav a {
    font-size: .56rem;
  }
}


/* v4: corrected wordmark proportions */
.site-nav a {
  font-size: .86rem;
}

/*
  The logo was 15.2rem wide before the wordmark experiment.
  22.8rem is exactly 1.5 times that width.
*/
.hero-logo {
  width: clamp(18rem, 28.5vw, 22.8rem);
  aspect-ratio: 600 / 536;
}

/* KATKO and VIIVOJA use exactly the same typography and width. */
.hero .brand-word {
  width: calc(clamp(18rem, 28.5vw, 22.8rem) * .94);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-family: "Jost", sans-serif;
  font-size: clamp(.72rem, 1.05vw, .9rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0;
  text-indent: 0;
  white-space: nowrap;
}

/*
  Negative margins pull both words 50% closer to the visible logo frame.
  Because the PNG canvas is now cropped, these values affect the actual
  frame rather than unused transparent space.
*/
.hero .brand-word-top {
  margin-bottom: -.1rem;
}

.hero .brand-word-bottom {
  margin-top: -.08rem;
}

.service-name {
  margin-top: .45rem;
}

/* User portrait on the About page */
.about-photo-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

@media (min-width: 48rem) and (max-height: 50rem) {
  .hero-logo {
    width: clamp(16.5rem, 24vw, 20.4rem);
  }

  .hero .brand-word {
    width: calc(clamp(16.5rem, 24vw, 20.4rem) * .94);
    font-size: clamp(.68rem, .95vw, .84rem);
  }
}

@media (max-width: 40rem) {
  .site-nav a {
    font-size: .72rem;
  }

  .hero-logo {
    width: min(18rem, 86vw);
  }

  .hero .brand-word {
    width: calc(min(18rem, 86vw) * .94);
    font-size: .76rem;
  }
}

@media (max-width: 27rem) {
  .site-nav a {
    font-size: .66rem;
  }
}


/* ChatGPT v6 branding tweak */
.hero-logo{width:80%!important;max-width:18rem!important}
.brand-word-top,.brand-word-bottom{display:none!important}
.hero-title,.brand-title,.wordmark{
 font-weight:500!important;
 font-size:1.15em!important;
 letter-spacing:.18em!important;
}

/* v7: softer and more pronounced sculpted footer wave */
.footer-wave {
  top: -4.1rem;
  left: -4%;
  width: 108%;
  height: 5.6rem;
  background: transparent;
  clip-path: none;
  overflow: hidden;
  pointer-events: none;
}

.footer-wave::before,
.footer-wave::after {
  content: "";
  position: absolute;
  background: var(--footer);
}

.footer-wave::before {
  left: -7%;
  bottom: -1.45rem;
  width: 76%;
  height: 5.2rem;
  border-radius: 52% 48% 0 0 / 72% 84% 0 0;
  transform: rotate(-2.2deg);
}

.footer-wave::after {
  right: -8%;
  bottom: -1.05rem;
  width: 69%;
  height: 4.35rem;
  border-radius: 50% 50% 0 0 / 82% 68% 0 0;
  transform: rotate(2.8deg);
}

.site-footer {
  min-height: 7.6rem;
}

.footer-content {
  min-height: 7.6rem;
  padding-top: 3.55rem;
}

html[data-theme="light"] .footer-wave::before,
html[data-theme="light"] .footer-wave::after {
  background: linear-gradient(180deg, var(--footer), var(--footer-deep));
}

@media (min-width: 48rem) and (max-height: 50rem) {
  .footer-wave {
    top: -3.4rem;
    height: 4.8rem;
  }

  .footer-wave::before {
    height: 4.5rem;
  }

  .footer-wave::after {
    height: 3.8rem;
  }
}

@media (max-width: 40rem) {
  .footer-wave {
    top: -3.15rem;
    height: 4.45rem;
  }

  .footer-wave::before {
    left: -18%;
    width: 91%;
    height: 4.2rem;
    bottom: -1.3rem;
  }

  .footer-wave::after {
    right: -18%;
    width: 86%;
    height: 3.65rem;
    bottom: -1rem;
  }

  .site-footer,
  .footer-content {
    min-height: 6.8rem;
  }

  .footer-content {
    padding-top: 3rem;
  }
}


/* v8: final polish — motion, depth, interaction and trust cues */

/* Unified hero wordmark */
.hero-wordmark {
  width: min(31rem, 92vw);
  margin: 0 0 .7rem;
  color: var(--ink);
  font-family: "Jost", sans-serif;
  font-size: clamp(1.15rem, 2.35vw, 1.72rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: .27em;
  text-align: center;
  text-indent: .27em;
}

/* Keep the logo 20% smaller than the prior 18rem maximum. */
.hero-logo {
  width: clamp(11.8rem, 22vw, 14.4rem) !important;
  max-width: none !important;
}

/* 1. Calm staggered entrance animation */
@keyframes katko-rise {
  from {
    opacity: 0;
    transform: translateY(.65rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-wordmark,
.hero-logo,
.service-name,
.hero-rule,
.hero blockquote,
.hero-actions {
  opacity: 0;
  animation: katko-rise .72s cubic-bezier(.22,.61,.36,1) forwards;
}

.hero-wordmark { animation-delay: .08s; }
.hero-logo { animation-delay: .17s; }
.service-name { animation-delay: .25s; }
.hero-rule { animation-delay: .32s; }
.hero blockquote { animation-delay: .39s; }
.hero-actions { animation-delay: .48s; }

/* 2. Refined lift on buttons and interactive controls */
.hero-actions > a,
.contact-panel summary,
.theme-toggle {
  transition:
    transform .22s ease,
    box-shadow .22s ease,
    background-color .22s ease,
    border-color .22s ease,
    color .22s ease;
}

.hero-actions > a:hover,
.hero-actions > a:focus-visible,
.contact-panel summary:hover,
.contact-panel summary:focus-visible {
  transform: translateY(-2px);
  text-shadow: 0 .35rem 1rem rgba(0,0,0,.09);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-2px);
  background: var(--card);
  box-shadow: 0 .65rem 1.5rem rgba(0,0,0,.11);
}

/* 3. Very subtle heading emphasis */
.service-card h2,
.about-copy h1 {
  transition: color .24s ease, letter-spacing .24s ease;
}

.service-card:hover h2,
.service-card:focus-within h2,
.about-grid:hover .about-copy h1 {
  color: var(--body);
  letter-spacing: .012em;
}

.service-card {
  transition:
    transform .28s ease,
    box-shadow .28s ease,
    border-color .28s ease,
    background-color .28s ease;
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--ink);
  background: rgba(255,255,255,.08);
  box-shadow: 0 1.2rem 2.6rem rgba(0,0,0,.08);
}

/* 4. Nearly invisible dashed-path motif behind the hero */
.hero::before {
  content: "";
  position: absolute;
  inset: 9% -14% 8%;
  z-index: -1;
  pointer-events: none;
  opacity: .055;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 1.15rem,
      var(--ink) 1.15rem 1.42rem,
      transparent 1.42rem 2.55rem
    );
  mask-image: radial-gradient(ellipse at center, #000 0 42%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0 42%, transparent 76%);
  transform: rotate(-2deg);
}

html[data-theme="dark"] .hero::before {
  opacity: .035;
}

/* 5. More organic, layered footer silhouette */
.footer-wave {
  top: -4.55rem;
  left: -6%;
  width: 112%;
  height: 6.2rem;
  overflow: hidden;
  background:
    radial-gradient(70% 100% at 13% 100%, var(--footer) 0 72%, transparent 73%),
    radial-gradient(62% 92% at 47% 100%, var(--footer) 0 74%, transparent 75%),
    radial-gradient(72% 105% at 84% 100%, var(--footer) 0 72%, transparent 73%);
  clip-path: none;
}

.footer-wave::before,
.footer-wave::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 50%;
  background: var(--footer);
  pointer-events: none;
}

.footer-wave::before {
  width: 58%;
  height: 4.4rem;
  left: -4%;
  bottom: -2.1rem;
  transform: rotate(-3deg);
}

.footer-wave::after {
  width: 54%;
  height: 4.1rem;
  right: -3%;
  bottom: -1.85rem;
  transform: rotate(3.2deg);
}

html[data-theme="light"] .footer-wave {
  background:
    radial-gradient(70% 100% at 13% 100%, var(--footer) 0 72%, transparent 73%),
    radial-gradient(62% 92% at 47% 100%, var(--footer-deep) 0 74%, transparent 75%),
    radial-gradient(72% 105% at 84% 100%, var(--footer) 0 72%, transparent 73%);
}

.site-footer {
  min-height: 8rem;
}

.footer-content {
  min-height: 8rem;
  padding-top: 3.95rem;
}

/* 6. Elegant focus treatment for present and future forms */
input,
textarea,
select {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.08);
  color: var(--body);
  outline: none;
  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    background-color .2s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #b89b5e;
  background: rgba(255,255,255,.13);
  box-shadow: 0 0 0 .18rem rgba(184,155,94,.16);
}

/* Clear keyboard focus throughout the site */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ink) 58%, transparent);
  outline-offset: .28rem;
}

/* Respect motion preferences */
@media (prefers-reduced-motion: reduce) {
  .hero-wordmark,
  .hero-logo,
  .service-name,
  .hero-rule,
  .hero blockquote,
  .hero-actions {
    opacity: 1;
    animation: none;
    transform: none;
  }

  .hero-actions > a:hover,
  .hero-actions > a:focus-visible,
  .contact-panel summary:hover,
  .contact-panel summary:focus-visible,
  .theme-toggle:hover,
  .theme-toggle:focus-visible,
  .service-card:hover,
  .service-card:focus-within {
    transform: none;
  }
}

@media (max-width: 40rem) {
  .hero-wordmark {
    width: min(25rem, 94vw);
    margin-bottom: .55rem;
    font-size: clamp(.95rem, 5vw, 1.3rem);
    letter-spacing: .19em;
    text-indent: .19em;
  }

  .hero-logo {
    width: min(12rem, 70vw) !important;
  }

  .hero::before {
    inset-inline: -4%;
    opacity: .04;
  }

  .footer-wave {
    top: -3.65rem;
    height: 5rem;
  }

  .site-footer,
  .footer-content {
    min-height: 7.1rem;
  }

  .footer-content {
    padding-top: 3.25rem;
  }
}
