/*
 OMA IHMINEN 7.0
 Viimeistelykerros nykyisen teeman päälle.

 TARKOITUKSELLA EI MUUTETA:
 - sivupohjia
 - sisältöjen järjestystä
 - kuvien lähteitä, rajauksia tai mittoja
 - WordPressin valikoita
*/

:root {
  --oma-bg: #f3eadf;
  --oma-bg-deep: #e9dccd;
  --oma-surface: #fbf7f1;
  --oma-surface-soft: #eee3d6;
  --oma-ink: #4f4942;
  --oma-muted: #746c63;
  --oma-olive: #626a43;
  --oma-olive-deep: #454c2f;
  --oma-olive-soft: #858b68;
  --oma-sand: #cfb99f;
  --oma-sand-light: #e5d4c0;
  --oma-line: rgba(79, 73, 66, .17);
  --oma-shadow-soft: 0 16px 44px rgba(62, 54, 46, .09);
  --oma-shadow-hover: 0 20px 54px rgba(62, 54, 46, .14);
  --oma-radius-sm: 12px;
  --oma-radius: 20px;
  --oma-radius-lg: 30px;
  --oma-ease: cubic-bezier(.2,.7,.2,1);
  --oma-hero-title: #faf6f0;
  --oma-hero-text: #f0e8de;
}

/* Perussävyt */
html {
  scroll-behavior: smooth;
}

body,
.site,
#page,
.wp-site-blocks {
  color: var(--oma-ink);
  background-color: var(--oma-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
  color: var(--oma-ink);
}

p,
li,
dd,
dt,
.entry-content,
.wp-block-post-content {
  color: inherit;
}

a {
  color: var(--oma-olive-deep);
  text-decoration-thickness: .06em;
  text-underline-offset: .18em;
  transition: color .2s var(--oma-ease), opacity .2s var(--oma-ease);
}

a:hover,
a:focus-visible {
  color: var(--oma-olive);
}

/* Otsikot muualla kuin kuvallisten hero-alueiden päällä */
h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title,
.wp-block-post-title,
.site-title {
  color: var(--oma-olive-deep);
  text-wrap: balance;
}

.entry-meta,
.wp-block-post-date,
.wp-block-post-author,
.site-description,
.wp-block-post-terms,
small {
  color: var(--oma-muted);
}

/* Ylätunniste ja navigointi */
.site-header,
header.site-header,
.wp-block-template-part > header,
header.wp-block-template-part {
  color: var(--oma-ink);
  background: rgba(243, 234, 223, .92);
  border-color: var(--oma-line);
  box-shadow: 0 1px 0 rgba(79,73,66,.06);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.site-header a,
header.site-header a,
.wp-block-navigation a {
  color: var(--oma-olive-deep);
}

.site-header a:hover,
.site-header a:focus-visible,
.wp-block-navigation a:hover,
.wp-block-navigation a:focus-visible {
  color: var(--oma-olive);
}

.current-menu-item > a,
.current_page_item > a,
.wp-block-navigation-item.current-menu-item > a {
  color: var(--oma-olive);
}

/* Hero- ja kansialueet */
.hero,
.oma-hero,
.hero-section,
.hero-banner,
.page-hero,
.front-hero,
.masthead,
.banner,
.wp-block-cover,
.wp-block-cover-image {
  position: relative;
  isolation: isolate;
}

/* Ei kosketa itse kuvaan. Lisätään vain tekstin alle yhtenäinen kontrastikerros. */
.hero::before,
.oma-hero::before,
.hero-section::before,
.hero-banner::before,
.page-hero::before,
.front-hero::before,
.masthead::before,
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(17, 21, 14, .34) 0%,
      rgba(17, 21, 14, .28) 36%,
      rgba(17, 21, 14, .45) 100%
    );
}

.wp-block-cover .wp-block-cover__background,
.wp-block-cover-image .wp-block-cover__background {
  background: #171b13 !important;
  opacity: .39 !important;
}

.hero > *,
.oma-hero > *,
.hero-section > *,
.hero-banner > *,
.page-hero > *,
.front-hero > *,
.masthead > *,
.banner > *,
.wp-block-cover__inner-container {
  position: relative;
  z-index: 1;
}

.hero h1, .hero h2,
.oma-hero h1, .oma-hero h2,
.hero-section h1, .hero-section h2,
.hero-banner h1, .hero-banner h2,
.page-hero h1, .page-hero h2,
.front-hero h1, .front-hero h2,
.masthead h1, .masthead h2,
.banner h1, .banner h2,
.wp-block-cover h1, .wp-block-cover h2,
.wp-block-cover-image h1, .wp-block-cover-image h2 {
  color: var(--oma-hero-title) !important;
  opacity: 1 !important;
  text-shadow: 0 3px 18px rgba(0,0,0,.52);
}

.hero p, .hero small, .hero .eyebrow, .hero .kicker, .hero .subtitle,
.oma-hero p, .oma-hero small, .oma-hero .oma-eyebrow,
.hero-section p, .hero-section small, .hero-section .eyebrow,
.hero-banner p, .hero-banner small,
.page-hero p, .page-hero small, .page-hero .eyebrow,
.front-hero p, .front-hero small, .front-hero .eyebrow,
.masthead p, .masthead small,
.banner p, .banner small,
.wp-block-cover p, .wp-block-cover small,
.wp-block-cover-image p, .wp-block-cover-image small {
  color: var(--oma-hero-text) !important;
  opacity: 1 !important;
  text-shadow: 0 2px 12px rgba(0,0,0,.46);
}

.hero .eyebrow,
.hero .kicker,
.oma-hero .oma-eyebrow,
.hero-section .eyebrow,
.page-hero .eyebrow,
.front-hero .eyebrow {
  letter-spacing: .26em;
}

/* Painikkeet */
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.wp-block-button__link,
.wp-element-button,
a.button,
.button {
  border: 1px solid var(--oma-olive);
  border-radius: 999px;
  color: #fffaf4;
  background: var(--oma-olive);
  box-shadow: 0 8px 20px rgba(69,76,47,.14);
  transition:
    transform .18s var(--oma-ease),
    box-shadow .18s var(--oma-ease),
    background-color .18s var(--oma-ease),
    border-color .18s var(--oma-ease);
}

button:hover,
button:focus-visible,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
.wp-block-button__link:hover,
.wp-element-button:hover,
a.button:hover,
.button:hover {
  color: #fff;
  background: var(--oma-olive-deep);
  border-color: var(--oma-olive-deep);
  box-shadow: 0 12px 28px rgba(69,76,47,.20);
  transform: translateY(-1px);
}

/* Hero-painikkeet pysyvät lämpiminä ja vaaleina */
.hero .wp-block-button__link,
.hero .button,
.oma-hero .wp-block-button__link,
.oma-hero .oma-button,
.hero-section .wp-block-button__link,
.hero-banner .wp-block-button__link,
.page-hero .wp-block-button__link,
.front-hero .wp-block-button__link,
.masthead .wp-block-button__link,
.banner .wp-block-button__link,
.wp-block-cover .wp-block-button__link {
  color: var(--oma-olive-deep) !important;
  background: #f5eadc !important;
  border-color: rgba(255,255,255,.35) !important;
  text-shadow: none !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}

.hero .wp-block-button__link:hover,
.hero .button:hover,
.oma-hero .wp-block-button__link:hover,
.oma-hero .oma-button:hover,
.hero-section .wp-block-button__link:hover,
.hero-banner .wp-block-button__link:hover,
.page-hero .wp-block-button__link:hover,
.front-hero .wp-block-button__link:hover,
.masthead .wp-block-button__link:hover,
.banner .wp-block-button__link:hover,
.wp-block-cover .wp-block-button__link:hover {
  color: var(--oma-olive-deep) !important;
  background: #e7d5c0 !important;
  border-color: #e7d5c0 !important;
}

/* Kortit ja sisältöpinnat. Ei pakoteta uusia mittoja tai ruudukkoja. */
article,
.card,
.wp-block-query .wp-block-post,
.widget,
.wp-block-group.has-background,
.wp-block-media-text.has-background,
.wp-block-columns.has-background {
  border-color: var(--oma-line);
}

.card,
.wp-block-query .wp-block-post,
.widget {
  transition:
    transform .22s var(--oma-ease),
    box-shadow .22s var(--oma-ease),
    border-color .22s var(--oma-ease);
}

.card:hover,
.wp-block-query .wp-block-post:hover {
  border-color: rgba(98,106,67,.25);
  box-shadow: var(--oma-shadow-soft);
  transform: translateY(-2px);
}

/* Lomakkeet */
input,
textarea,
select {
  color: var(--oma-ink);
  background: var(--oma-surface);
  border: 1px solid var(--oma-line);
  border-radius: var(--oma-radius-sm);
  transition:
    border-color .18s var(--oma-ease),
    box-shadow .18s var(--oma-ease),
    background-color .18s var(--oma-ease);
}

input:focus,
textarea:focus,
select:focus {
  background: #fffaf5;
  border-color: var(--oma-sand);
  outline: none;
  box-shadow: 0 0 0 4px rgba(207,185,159,.18);
}

::placeholder {
  color: #8a8177;
  opacity: 1;
}

/* Lainaukset, erottimet ja taulukot */
blockquote,
.wp-block-quote {
  color: var(--oma-olive-deep);
  border-color: var(--oma-sand);
}

hr,
.wp-block-separator {
  color: var(--oma-line);
  border-color: var(--oma-line);
}

table,
th,
td {
  border-color: var(--oma-line);
}

th {
  color: var(--oma-olive-deep);
  background: var(--oma-surface-soft);
}

/* Alatunniste */
.site-footer,
footer.site-footer,
.wp-block-template-part > footer,
footer.wp-block-template-part {
  color: var(--oma-ink);
  background: var(--oma-bg-deep);
  border-color: var(--oma-line);
}

.site-footer a,
footer.site-footer a {
  color: var(--oma-olive-deep);
}

/* Näppäimistökäytön näkyvä fokus */
:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--oma-sand);
  outline-offset: 3px;
}

/* Hienovarainen sivulle saapuminen */
@keyframes oma-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero > *,
.oma-hero > *,
.hero-section > *,
.page-hero > *,
.front-hero > *,
.wp-block-cover__inner-container {
  animation: oma-fade-up .75s var(--oma-ease) both;
}

/* Mobiiliviimeistely muuttamatta rakennetta */
@media (max-width: 782px) {
  :root {
    --oma-radius: 17px;
    --oma-radius-lg: 22px;
  }

  .hero::before,
  .oma-hero::before,
  .hero-section::before,
  .hero-banner::before,
  .page-hero::before,
  .front-hero::before,
  .masthead::before,
  .banner::before {
    background:
      linear-gradient(
        180deg,
        rgba(17,21,14,.39) 0%,
        rgba(17,21,14,.31) 38%,
        rgba(17,21,14,.49) 100%
      );
  }

  .wp-block-cover .wp-block-cover__background,
  .wp-block-cover-image .wp-block-cover__background {
    opacity: .43 !important;
  }

  button,
  input[type="button"],
  input[type="submit"],
  .wp-block-button__link,
  .wp-element-button,
  a.button,
  .button {
    min-height: 48px;
  }
}

/* Liike pois käyttäjän pyynnöstä */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Kuvia ei käsitellä millään tavalla. */
img,
picture,
video,
.wp-block-image,
.wp-block-cover__image-background {
  filter: none;
}
