/* =========================================
   AAVAKANGAS & CO.
   Metsä, luonnon sävyt ja rauhallinen ilme
   ========================================= */

:root {
  /* Kuvan väripaletti */
  --forest: #1f3a2e;
  --charcoal: #2e2e2e;
  --sand: #d8d0c4;
  --snow: #f7f6f3;

  /* Käyttövärit */
  --background: var(--snow);
  --text: var(--forest);
  --muted: #62665e;
  --line: #d8d0c4;
  --white: #ffffff;

  /* Kirjasimet toimivat ilman ulkoisia latauksia */
  --font-heading: Georgia, "Times New Roman", serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --content: 1240px;
  --gutter: clamp(24px, 5vw, 80px);
}

/* Perusasetukset */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--sand);
  color: var(--forest);
}

:focus-visible {
  outline: 3px solid #a8864b;
  outline-offset: 6px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--snow);
  color: var(--forest);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(
    calc(100% - var(--gutter) - var(--gutter)),
    var(--content)
  );
  margin-inline: auto;
}

/* Typografia */

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

h1 {
  font-size: clamp(48px, 7.5vw, 104px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

h2 {
  font-size: clamp(36px, 4.7vw, 66px);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(27px, 2.8vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.eyebrow {
  margin-bottom: 28px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.8;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Painikkeet */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 18px 30px;
  border: 1px solid var(--forest);
  border-radius: 0;
  background: var(--forest);
  color: var(--snow);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 200ms ease,
    color 200ms ease,
    border-color 200ms ease;
}

.button:hover {
  background: var(--charcoal);
  border-color: var(--charcoal);
}

.button--light {
  background: var(--snow);
  border-color: var(--snow);
  color: var(--forest);
}

.button--light:hover {
  background: var(--sand);
  border-color: var(--sand);
  color: var(--forest);
}

/* Ylävalikko */

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--snow);
  color: var(--forest);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  min-height: 100px;
}

.brand {
  font-family: var(--font-heading);
  font-size: clamp(19px, 2.2vw, 29px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.045em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav > a:not(.button) {
  padding-block: 12px;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-underline-offset: 7px;
}

.nav > a:not(.button):hover {
  text-decoration: underline;
}

/* Ylävalikon painike vihreäksi vaalealla pohjalla */
.header .button--light {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--snow);
}

.header .button--light:hover {
  background: var(--charcoal);
  border-color: var(--charcoal);
}

.menu-toggle {
  display: none;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--forest);
  border-radius: 0;
  background: transparent;
  color: var(--forest);
  font-size: 14px;
  cursor: pointer;
}

/* Aloitusnäkymä */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(860px, calc(100svh - 100px));
  padding: 110px var(--gutter) 70px;
  overflow: hidden;
  background: var(--forest);
  color: var(--snow);
  text-align: center;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Tummennus näkyy vain, jos taustakuva on lisätty */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.hero:has(.hero__image)::after {
  background: linear-gradient(
    180deg,
    rgb(15 31 23 / 38%),
    rgb(15 31 23 / 62%)
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 980px;
}

.hero .eyebrow {
  color: var(--sand);
}

.hero h1 {
  max-width: 900px;
  margin-inline: auto;
}

/* Ohut viiva kuten brändikuvassa */
.hero h1::after {
  content: "";
  display: block;
  width: 46px;
  height: 1px;
  margin: 36px auto 0;
  background: var(--sand);
}

.hero__description {
  max-width: 620px;
  margin: 28px auto 40px;
  color: var(--snow);
  font-family: var(--font-heading);
  font-size: clamp(21px, 2.4vw, 29px);
  font-style: italic;
  line-height: 1.6;
}

.hero .button--light {
  background: transparent;
  border-color: var(--sand);
  color: var(--snow);
}

.hero .button--light:hover {
  background: var(--snow);
  border-color: var(--snow);
  color: var(--forest);
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 36px;
  margin-top: 72px;
}

.hero__links a {
  padding-block: 8px;
  color: var(--sand);
  border-bottom: 1px solid transparent;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.hero__links a:hover {
  color: var(--snow);
  border-bottom-color: var(--sand);
}

/* Sisältöosiot */

.section {
  padding-block: clamp(80px, 10vw, 144px);
}

.section--light {
  background: var(--sand);
}

.section--dark {
  background: var(--forest);
  color: var(--snow);
}

.section__heading {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: end;
  gap: 70px;
  margin-bottom: 64px;
}

.section__heading p:not(.eyebrow) {
  max-width: 470px;
  color: var(--muted);
  font-size: 18px;
}

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

.card {
  min-width: 0;
}

.card__image {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  margin-bottom: 30px;
  overflow: hidden;
  background: var(--sand);
  color: var(--forest);
}

.card:nth-child(2) .card__image {
  background: #e8e7e0;
  color: var(--forest);
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder {
  padding: 24px;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.card h3 {
  margin-bottom: 16px;
}

.card p {
  max-width: 500px;
  color: var(--muted);
}

/* Aavakankaan esittely */

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(42px, 8vw, 110px);
}

.about__image {
  display: grid;
  place-items: center;
  aspect-ratio: 5 / 6;
  overflow: hidden;
  background: #2d473b;
  color: var(--sand);
}

.about__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__text .eyebrow {
  color: var(--sand);
}

.about__text h2 {
  margin-bottom: 30px;
}

.about__text h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 1px;
  margin-top: 30px;
  background: var(--sand);
}

.about__text > p:not(.eyebrow) {
  margin-bottom: 24px;
  color: #e1e5de;
  font-size: 18px;
}

.about__text .button {
  margin-top: 14px;
}

/* Yhteystiedot */

.contact {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 80px;
}

.contact__intro p:last-child {
  max-width: 500px;
  margin-top: 28px;
  color: #4d554c;
  font-size: 18px;
}

.contact__details {
  margin: 0;
}

.contact__row {
  padding-block: 24px;
  border-top: 1px solid #a7ada0;
}

.contact__row:last-child {
  border-bottom: 1px solid #a7ada0;
}

.contact__row dt {
  margin-bottom: 8px;
  color: #4d554c;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact__row dd {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.contact__row a {
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

/* Alatunniste */

.footer {
  padding-block: 44px;
  background: var(--charcoal);
  color: var(--snow);
}

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

.footer .brand {
  font-size: 23px;
}

.footer p,
.footer__top {
  color: var(--sand);
  font-size: 14px;
}

.footer__top {
  text-underline-offset: 6px;
}

/* Keskikokoiset näytöt */

@media (max-width: 1000px) {
  .nav {
    gap: 20px;
  }

  .nav .button {
    padding-inline: 20px;
  }

  .section__heading,
  .contact {
    gap: 40px;
  }
}

/* Mobiili */

@media (max-width: 760px) {
  html {
    scroll-padding-top: 100px;
  }

  .header__inner {
    min-height: 80px;
    flex-wrap: wrap;
    gap: 16px;
    padding-block: 18px;
  }

  .brand {
    font-size: 20px;
  }

  .nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px 22px;
    padding-bottom: 8px;
  }

  .js .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .js .nav {
    display: none;
  }

  .js .nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .js .nav > a:not(.button) {
    padding-block: 13px;
    font-size: 16px;
  }

  .js .nav .button {
    margin-top: 12px;
  }

  .hero {
    min-height: calc(90svh - 80px);
    padding-block: 86px 56px;
  }

  .hero .eyebrow {
    font-size: 14px;
    letter-spacing: 0.16em;
  }

  .hero h1::after {
    margin-top: 28px;
  }

  .hero__description {
    margin-top: 24px;
  }

  .hero__links {
    gap: 8px 22px;
    margin-top: 48px;
  }

  .section__heading,
  .cards,
  .about,
  .contact {
    grid-template-columns: 1fr;
  }

  .section__heading {
    gap: 26px;
    margin-bottom: 40px;
  }

  .cards {
    gap: 48px;
  }

  .about {
    gap: 42px;
  }

  .about__image {
    aspect-ratio: 4 / 3;
  }

  .contact {
    gap: 42px;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

/* Vähennetty liike */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
/* Pehmeämpi värimaailma */

:root {
  --forest: #514c46;
  --charcoal: #35322f;
  --sand: #ded6cb;
  --snow: #f7f5f1;

  --background: var(--snow);
  --text: #45413c;
  --muted: #6b655e;
  --line: #ded6cb;
}

.hero:has(.hero__image)::after {
  background: linear-gradient(
    180deg,
    rgb(44 40 35 / 38%),
    rgb(44 40 35 / 65%)
  );
}

.card:nth-child(2) .card__image {
  background: #e9e4dc;
  color: var(--text);
}

.about__image {
  background: #625b53;
  color: var(--sand);
}

.about__text > p:not(.eyebrow) {
  color: #ece7df;
}

.contact__intro p:last-child,
.contact__row dt {
  color: #59534c;
}

.contact__row {
  border-top-color: #b5aca0;
}

.contact__row:last-child {
  border-bottom-color: #b5aca0;
}
.header .brand {
  display: block;
  flex-shrink: 0;
}

.brand__logo {
  display: block;
  width: 300px;
  max-width: 100%;
  height: auto;
}

@media (max-width: 760px) {
  .brand__logo {
    width: 190px;
  }
}
/* Tilaa logon ylä- ja alapuolelle */
.header__inner {
  padding-block: 14px;
}