/*
 * M Taloushallinto – sivuston tyylit
 * Perustyylit ensin, responsiiviset muutokset lopussa.
 * Säilytetty hyväksytty ulkoasu; vain CSS-rakennetta selkeytetty.
 */

* {
  box-sizing: border-box;
}

/* ===== 01. PERUSTYYLIT JA TYPOGRAFIA ===== */

body {
  margin: 0;
  background: #faf8f3;
  color: #353535;
  font:
    16px/1.65 Arial,
    sans-serif;
}

h1,
h2,
h3 {
  font-family: Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: calc(100% - 96px);
  max-width: 1120px;
  margin: auto;
}

/* ===== 02. YLÄPALKKI JA NAVIGAATIO ===== */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #faf8f3;
}

.nav {
  height: 125px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  width: 215px;
  height: 96px;
}

.links {
  display: flex;
  align-items: center;
  gap: 29px;
  font-size: 14px;
}

.active {
  color: #9c8250;
}

/* ===== 03. PAINIKKEET ===== */

.btn {
  display: inline-block;
  padding: 14px 26px;
  background: #383838;
  color: #fffdf8;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.btn.light {
  background: transparent;
  color: #353535;
  border: 1px solid #cbc6b8;
}

/* ===== 04. ETUSIVUN PÄÄKUVA ===== */

.hero {
  height: 540px;
  background:
    linear-gradient(
      90deg,
      #faf8f3 0%,
      rgba(250, 248, 243, 0.96) 33%,
      rgba(250, 248, 243, 0.65) 52%,
      rgba(250, 248, 243, 0.04) 78%
    ),
    url(../images/alkuperainen-kuvitus-1.jpg) center right/cover;
  display: flex;
  align-items: center;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.24em;
  font-weight: 600;
  color: #8f7952;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 68px;
  margin: 23px 0;
}

.hero p {
  font-size: 18px;
  color: #656565;
  max-width: 475px;
  margin: 0 0 26px;
}

.hero .btn {
  margin-right: 14px;
}

.micro {
  font-size: 12px;
  color: #747474;
  margin-top: 22px;
}

/* ===== 05. PALVELUT JA KORTIT ===== */

.services {
  padding: 67px 0 73px;
}

.sectionhead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 30px;
}

.sectionhead h2 {
  font-size: 42px;
  margin-top: 13px;
}

.sectionhead p {
  max-width: 365px;
  color: #686868;
  font-size: 14px;
  margin: 0 0 3px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.card {
  background: #fffdf9;
  border: 1px solid #e5dfd3;
  padding: 26px 24px 24px;
  min-height: 263px;
  display: flex;
  flex-direction: column;
}

.icon {
  height: 31px;
  color: #a88d57;
  margin-bottom: 18px;
}

.icon svg {
  width: 29px;
  height: 29px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  font-size: 24px;
  min-height: 55px;
}

.card p {
  font-size: 14px;
  color: #686868;
  margin: 13px 0 20px;
}

.textlink {
  font-size: 13px;
  color: #806b43;
}

.card .textlink {
  margin-top: auto;
}

/* ===== 06. ESITTELYOSIO ===== */

.feature {
  min-height: 460px;
  padding: 65px 0;
  display: flex;
  align-items: center;
  background: #f0ebe2 url(../images/graafinen-tausta-desktop.svg) center/cover
    no-repeat;
}

.feature .wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.feature .wrap > div {
  width: 46%;
}

.feature h2 {
  font-size: 43px;
  margin: 18px 0 20px;
}

.feature p {
  font-size: 15px;
  color: #656565;
  margin-bottom: 20px;
}

/* ===== 07. YHTEYDENOTTO JA LOMAKE ===== */

.contact {
  padding: 72px 0 74px;
}

.contact .wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 100px;
}

.contact h2 {
  font-size: 46px;
  margin: 17px 0 21px;
}

.contact p {
  font-size: 15px;
  color: #656565;
  max-width: 340px;
}

.details {
  margin-top: 30px;
  font-size: 14px;
  line-height: 1.9;
}

.details strong {
  font-weight: 500;
  color: #353535;
}

.form {
  border: 1px solid #e5dfd3;
  background: #fffdf9;
  padding: 30px;
}

.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field label {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
  color: #595959;
}

.input {
  height: 43px;
  background: #faf8f3;
  border: 1px solid #ded9cd;
}

.field.full {
  grid-column: 1/-1;
}

.message {
  height: 90px;
}

.privacy {
  font-size: 11px;
  color: #747474;
  line-height: 1.6;
  margin: 16px 0;
}

.privacy u {
  color: #806b43;
}

.form .btn {
  margin-top: 3px;
}

/* ===== 08. ALATUNNISTE ===== */

.footer {
  background: #f0ebe2;
  border-top: 1px solid #e3d9c9;
}

.footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0;
  font-size: 12px;
  color: #6d6d6d;
}

.footer .legal {
  display: flex;
  gap: 28px;
}

/* ===== 09. MUUT YLEISET ELEMENTIT ===== */

.draft {
  padding: 9px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #8b806e;
  background: #f5f1e9;
}

.mobile-menu {
  display: none;
}

/* ===== 10. SAAVUTETTAVUUS JA YLEISET TÄYDENNYKSET ===== */

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

button,
input,
textarea {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #806b43;
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: 20px;
  top: -100px;
  background: #fff;
  padding: 12px;
  z-index: 10;
}

.skip:focus {
  top: 10px;
}

.links a:not(.btn) {
  padding: 12px 0;
}

.mobile-menu nav a {
  display: block;
  padding: 10px 0;
  font-size: 15px;
}

.hero .btn,
.form .btn {
  cursor: pointer;
}

.card h3 br {
  display: none;
}

.card p {
  font-size: 14px;
}

.card .textlink {
  padding-top: 8px;
}

.card {
  min-width: 0;
}

.hero h1 {
  max-width: 650px;
}

.feature p {
  max-width: 510px;
}

/* ===== 11. SISÄSIVUJEN TYYLIT ===== */

.page-heading {
  background: #f0ebe2 url(../images/graafinen-tausta-desktop.svg) center/cover;
  padding: 55px 0;
}

.page-heading h1 {
  font-size: 52px;
  max-width: 900px;
  margin-top: 15px;
}

.page-heading .back {
  font-size: 13px;
  color: #806b43;
}

.page-body {
  padding: 54px 0 70px;
  min-height: 55vh;
}

.prose {
  max-width: 800px;
}

.prose p {
  line-height: 1.9;
  color: #656565;
}

.prose h2 {
  font-size: 30px;
  margin: 34px 0 16px;
}

.prose h3 {
  font-size: 23px;
  margin: 25px 0 12px;
}

.prose a {
  text-decoration: underline;
  color: #806b43;
}

.prose ul {
  padding-left: 23px;
  color: #656565;
}

.prose .btn {
  color: white;
  text-decoration: none;
}

.service-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.service-detail {
  padding: 28px;
  background: #fffdf9;
  border: 1px solid #e5dfd3;
  scroll-margin-top: 30px;
}

.service-detail h2 {
  font-size: 30px;
  margin: 0 0 18px;
}

.service-detail p {
  color: #656565;
  line-height: 1.85;
}

.service-detail .btn {
  margin-top: 15px;
}

.pricing {
  padding-top: 30px;
}

.useful-layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 54px;
}

.article-nav {
  font-size: 13px;
  align-self: start;
  position: sticky;
  top: 20px;
  border-left: 1px solid #ded9cd;
  padding-left: 18px;
  max-height: 80vh;
  overflow: auto;
}

.article-nav a {
  display: block;
  padding: 7px 0;
  color: #656565;
}

.guide details {
  border-bottom: 1px solid #e1d9cc;
  padding: 18px 0;
}

.guide summary {
  font-family: Georgia, serif;
  font-size: 23px;
  cursor: pointer;
  line-height: 1.4;
  list-style: none;
  padding-right: 24px;
  position: relative;
}

.guide summary:after {
  content: "+";
  position: absolute;
  right: 0;
  font-family: Arial;
  font-size: 22px;
  color: #927e59;
}

.guide details[open] summary:after {
  content: "−";
}

.guide p {
  font-size: 15px;
  line-height: 1.9;
  color: #656565;
}

.guide .expand-all {
  background: none;
  border: 1px solid #cbc6b8;
  color: #535353;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 13px;
}

.news-card {
  border: 1px solid #e5dfd3;
  background: #fffdf9;
  padding: 30px;
  max-width: 800px;
}

.news-card h2 {
  font-size: 32px;
  margin: 12px 0;
}

.news-card time,
.article-date {
  font-size: 13px;
  color: #747474;
}

.news-card p {
  color: #656565;
}

.page-contact .contact {
  padding: 0;
}

.page-contact .contact .wrap {
  width: 100%;
}

.input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 0;
  color: #353535;
}

.message {
  resize: vertical;
  min-height: 110px;
}

.form button {
  border: 0;
}

.form [disabled] {
  opacity: 0.6;
  cursor: wait;
}

.form-status {
  font-size: 14px;
  margin-top: 16px;
  line-height: 1.7;
}

.form-status.error {
  color: #8b392b;
}

.form-status.success {
  color: #353535;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.privacy a {
  text-decoration: underline;
  color: #806b43;
}

.phone-link {
  display: inline-block;
  padding: 4px 0;
}

.review-note {
  background: #f2e8d5;
  border-left: 3px solid #a88d57;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 24px;
  color: #5f5545;
}

.review-only {
  font-size: 12px;
  color: #747474;
  margin: 20px 0;
}

.comparison {
  border-top: 1px solid #ded9cd;
  padding: 25px 0;
}

.comparison .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8f7952;
}

.comparison blockquote {
  margin: 12px 0;
  padding-left: 15px;
  border-left: 2px solid #ded9cd;
  color: #656565;
}

.form-noscript {
  font-size: 14px;
}

.top-cta {
  margin-top: 32px;
}

.footer a:hover,
.textlink:hover {
  text-decoration: underline;
}

.footer .legal {
  flex-wrap: wrap;
}

.privacy-page dt {
  font-weight: 600;
}

.privacy-page dd {
  margin: 6px 0 22px;
  color: #656565;
  line-height: 1.9;
}

/* ===== 12. TABLETIT JA PIENEMMÄT NÄYTÖT ===== */
@media (max-width: 1000px) {
  .contact .wrap {
    gap: 42px;
  }

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

  .card {
    min-height: 240px;
  }

  .feature .wrap > div {
    width: 49%;
  }

  .links {
    gap: 15px;
    font-size: 12px;
  }

  .logo {
    width: 170px;
  }

  .nav .btn {
    padding: 12px 15px;
  }

  .useful-layout {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 30px;
  }
}

/* ===== 13. MOBIILINÄKYMÄ ===== */
@media (max-width: 700px) {
  .wrap {
    width: calc(100% - 40px);
  }

  .nav {
    height: 94px;
    position: relative;
    justify-content: flex-end;
  }

  .links {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .mobile-menu summary {
    list-style: none;
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: pointer;
    min-height: 44px;
    padding: 8px 0 8px 12px;
    font-size: 13px;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu summary span:last-child {
    font-size: 22px;
  }

  .mobile-menu nav {
    position: absolute;
    top: 93px;
    left: -20px;
    right: -20px;
    z-index: 5;
    background: #faf8f3;
    border-bottom: 1px solid #e5dfd3;
    padding: 14px 20px;
    box-shadow: 0 12px 20px #00000008;
  }

  .mobile-menu nav span {
    display: block;
    padding: 10px 0;
    font-size: 15px;
  }

  .hero {
    height: auto;
    min-height: 440px;
    padding: 24px 0 30px;
    align-items: flex-start;
    background-image:
      linear-gradient(
        180deg,
        rgba(250, 248, 243, 0.88) 0%,
        rgba(250, 248, 243, 0.78) 30%,
        rgba(250, 248, 243, 0.55) 50%
      ),
      url("../images/alkuperainen-kuvitus-1.jpg");
    background-position:
      center,
      90% center;
  }

  .eyebrow {
    font-size: 9px;
    letter-spacing: 0.17em;
    line-height: 1.8;
  }

  .hero h1 {
    font-size: clamp(33px, 9vw, 48px);
    margin: 21px 0;
    line-height: 1.15;
    letter-spacing: -0.04em;
    max-width: 100%;
  }

  .hero p {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 22px;
  }

  .hero p br {
    display: none;
  }

  .hero .btn {
    margin-right: 0;
    padding: 14px 20px;
    min-height: 48px;
  }

  .hero > .wrap > .textlink {
    display: block;
    margin-top: 18px;
  }

  .micro {
    font-size: 11px;
    line-height: 1.9;
    max-width: 320px;
    margin-top: 24px;
  }

  .services {
    padding: 44px 0 46px;
  }

  .sectionhead {
    display: block;
    margin-bottom: 24px;
  }

  .sectionhead h2 {
    font-size: 36px;
    margin-top: 10px;
  }

  .sectionhead p {
    margin-top: 17px;
    font-size: 14px;
  }

  .sectionhead p br {
    display: none;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card {
    padding: 24px;
    min-height: 0;
  }

  .icon {
    margin-bottom: 12px;
  }

  .card h3 {
    font-size: 25px;
    min-height: 0;
  }

  .card h3 br {
    display: none;
  }

  .card p {
    font-size: 14px;
    margin: 12px 0 18px;
  }

  .textlink {
    font-size: 14px;
  }

  .card .textlink {
    padding: 4px 0;
    padding-top: 8px;
  }

  .feature {
    padding: 56px 0 52px;
    min-height: 0;
    background: #f0ebe2 url(../images/mobiili-graafinen-tausta.svg) center/100%
      100% no-repeat;
    padding-top: 56px;
  }

  .feature .wrap > div {
    width: 100%;
  }

  .feature h2 {
    font-size: 36px;
    margin: 15px 0 21px;
  }

  .feature p {
    font-size: 15px;
    line-height: 1.8;
  }

  .feature .textlink {
    display: inline-block;
    margin-top: 5px;
  }

  .contact {
    padding: 45px 0;
  }

  .contact .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .contact h2 {
    font-size: 37px;
  }

  .contact p {
    font-size: 15px;
    max-width: none;
  }

  .details {
    margin-top: 24px;
    font-size: 15px;
  }

  .form {
    padding: 22px;
  }

  .formgrid {
    grid-template-columns: minmax(0, 1fr);
    gap: 17px;
  }

  .field label {
    font-size: 13px;
  }

  .input {
    height: 48px;
  }

  .message {
    height: 120px;
  }

  .privacy {
    font-size: 12px;
    line-height: 1.8;
  }

  .privacy br {
    display: none;
  }

  .form .btn {
    display: block;
    text-align: center;
    min-height: 48px;
  }

  .footer .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 26px 0;
    font-size: 13px;
  }

  .footer .legal {
    flex-direction: column;
    gap: 10px;
  }

  .draft {
    font-size: 9px;
    line-height: 1.7;
    padding: 12px 20px;
  }

  .page-heading {
    padding: 35px 0;
  }

  .page-heading h1 {
    font-size: 36px;
    overflow-wrap: anywhere;
  }

  .page-body {
    padding: 35px 0 45px;
  }

  .service-list {
    grid-template-columns: 1fr;
  }

  .service-detail {
    padding: 24px;
  }

  .service-detail h2 {
    font-size: 28px;
  }

  .useful-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .article-nav {
    position: static;
    max-height: 230px;
  }

  .guide summary {
    font-size: 22px;
  }

  .prose h2 {
    font-size: 28px;
  }

  .privacy-page dd {
    margin-left: 0;
  }

  .hero .wrap > p {
    max-width: 330px;
  }

  .hero .eyebrow {
    line-height: 1.8;
  }

  .news-card {
    padding: 24px;
  }

  .nav > a:first-child {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .logo {
    width: 145px;
    height: auto;
    display: block;
  }
}

/* ===== 14. KÄYTTÄJÄN ANIMAATIOASETUS ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (min-width: 1800px) {
  .hero {
    height: clamp(540px, 30vw, 800px);
  }
}
