/* ==========================================================================
   Mar-Ker Oy — sivuston tyylit
   ========================================================================== */

:root {
  --ink: #1a1512;
  --ink-soft: #2a231d;
  --paper: #faf6ef;
  --paper-deep: #f2ebdd;
  --gold: #da9e00;
  --gold-deep: #b28100;
  --muted: #6f665a;
  --muted-on-dark: #b5aa99;
  --line: rgba(26, 21, 18, .14);
  --display: "Bricolage Grotesque", sans-serif;
  --body: "Instrument Sans", sans-serif;
  --accent: "Fraunces", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-family: var(--display); line-height: 1.05; font-weight: 600; letter-spacing: -.02em; }

.eyebrow {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow-dark { color: var(--gold-deep); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .35s ease, box-shadow .35s ease;
}
.nav.scrolled, .nav.solid {
  background: rgba(26, 21, 18, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.nav-logo img { height: 42px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 34px; list-style: none; }
.nav-links a {
  color: #fff; text-decoration: none; font-size: 15px; font-weight: 500;
  opacity: .85; transition: opacity .2s;
}
.nav-links a:hover, .nav-links a.current { opacity: 1; }
.nav-links a.current { border-bottom: 1.5px solid var(--gold); padding-bottom: 2px; }
.nav-cta {
  background: var(--gold); color: var(--ink) !important; opacity: 1 !important;
  padding: 11px 22px; border-radius: 3px; font-weight: 600 !important;
  transition: background .2s !important; border: 0 !important;
}
.nav-cta:hover { background: #f0b208; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0;
  transition: transform .25s, opacity .25s;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 16px;
  font-family: var(--body); border: 0; cursor: pointer;
  padding: 15px 30px; border-radius: 3px;
  transition: background .2s, border-color .2s, color .2s;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #f0b208; }
.btn-ghost { border: 1px solid rgba(255,255,255,.45); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #3a3129; }
.btn-outline { border: 1px solid var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-lg { padding: 18px 38px; font-size: 17px; }

/* ---------- Hero (etusivu) ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  background: url("images/hero-tiski.webp") center 30% / cover no-repeat;
  color: #fff;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,15,10,.42) 0%, rgba(20,15,10,.18) 40%, rgba(20,15,10,.62) 100%),
    linear-gradient(100deg, rgba(20,15,10,.45) 0%, rgba(20,15,10,0) 60%);
}
.hero-content { position: relative; z-index: 2; width: 100%; padding: 140px 0 72px; }
.hero h1 {
  font-size: clamp(44px, 7.2vw, 96px); font-weight: 600;
  max-width: 13ch; margin: 20px 0 26px; text-wrap: balance;
}
.hero h1 em {
  font-family: var(--accent); font-style: italic; font-weight: 500;
  color: var(--gold); letter-spacing: 0;
}
.hero p { max-width: 54ch; font-size: 18px; color: rgba(255,255,255,.88); margin-bottom: 36px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-foot {
  position: relative; z-index: 2; margin-top: 56px; padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  font-size: 14px; color: rgba(255,255,255,.75);
}
.hero-foot img { height: 44px; width: auto; border-radius: 3px; }
.hero-foot .tagline { letter-spacing: .14em; text-transform: uppercase; font-size: 12px; font-weight: 500; }

/* ---------- Page hero (alasivut) ---------- */
.page-hero {
  position: relative; background: var(--ink); color: var(--paper);
  padding: 168px 0 84px; overflow: hidden;
}
.page-hero.with-image { background: var(--ink) center 40% / cover no-repeat; }
.page-hero.with-image::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,15,10,.82) 0%, rgba(20,15,10,.66) 45%, rgba(20,15,10,.86) 100%),
    linear-gradient(95deg, rgba(20,15,10,.66) 0%, rgba(20,15,10,.12) 78%);
}
.page-hero.with-image h1,
.page-hero.with-image .eyebrow { text-shadow: 0 1px 18px rgba(20,15,10,.45); }
.page-hero.with-image p.lead {
  color: rgba(255,255,255,.92); max-width: 52ch;
  text-shadow: 0 1px 14px rgba(20,15,10,.55);
}
.page-hero > .wrap, .page-hero > .wrap-narrow { position: relative; z-index: 2; }
.page-hero h1 {
  font-size: clamp(38px, 6vw, 74px); margin: 16px 0 20px; max-width: 18ch; text-wrap: balance;
}
.page-hero h1 em { font-family: var(--accent); font-style: italic; font-weight: 500; color: var(--gold); }
.page-hero p.lead { font-size: 19px; color: var(--muted-on-dark); max-width: 60ch; }
.page-hero .hero-actions { margin-top: 34px; }

/* ---------- Sections ---------- */
section { padding: 110px 0; }
section.tight { padding: 76px 0; }
.section-head { margin-bottom: 56px; }
.section-head h2 { font-size: clamp(34px, 4.6vw, 58px); margin-top: 14px; }
.section-head p { max-width: 62ch; margin-top: 18px; color: var(--muted); }
h2.section-title { font-size: clamp(34px, 4.6vw, 58px); margin: 14px 0 26px; }

/* Intro grid */
.intro-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: start;
  margin-bottom: 72px;
}
.intro-grid .lead { font-size: 21px; line-height: 1.55; color: var(--ink-soft); }
.intro-figure { position: relative; }
.intro-figure img { border-radius: 4px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.intro-figure::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px;
  border: 1px solid var(--gold); border-radius: 4px; z-index: -1;
}

/* Numeroidut palvelurivit */
.service {
  display: grid; grid-template-columns: 110px 1fr 1.2fr; gap: 32px;
  padding: 44px 0; border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service-num { font-family: var(--display); font-size: 20px; font-weight: 500; color: var(--gold); padding-top: 6px; }
.service h4 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; text-wrap: balance; }
.service p { color: var(--muted); max-width: 58ch; }

/* Tumma osio */
.dark-section { background: var(--ink); color: var(--paper); padding: 0; }
.dark-section.padded { padding: 110px 0; }
.dark-section p { color: var(--muted-on-dark); }
.work-grid { display: grid; grid-template-columns: .9fr 1.1fr; min-height: 640px; }
.work-figure { position: relative; overflow: hidden; }
.work-figure img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.work-body { padding: 110px 24px 110px 80px; max-width: 640px; }
.work-body h2 { font-size: clamp(34px, 4.6vw, 58px); margin: 14px 0 18px; }
.work-body h3 {
  font-family: var(--accent); font-style: italic; font-weight: 400;
  font-size: clamp(20px, 2.2vw, 26px); line-height: 1.35; color: var(--gold); margin-bottom: 22px;
}
.work-body p { color: var(--muted-on-dark); margin-bottom: 36px; }

/* Askeleet 01-02-03 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step { border-top: 2px solid var(--gold); padding-top: 24px; }
.step .n { font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--gold-deep); letter-spacing: .1em; }
.step h4 { font-size: 24px; margin: 10px 0 10px; }
.step p { color: var(--muted); font-size: 16px; }
.dark-section .step p { color: var(--muted-on-dark); }

/* Faktalaatikot */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 26px 24px; }
.dark-section .fact { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); }
.fact .n { font-family: var(--display); font-size: 30px; font-weight: 600; color: var(--gold-deep); line-height: 1.1; }
.dark-section .fact .n { color: var(--gold); }
.fact p { font-size: 15px; color: var(--muted); margin-top: 8px; line-height: 1.45; }

/* Uutiskortit */
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.news-card {
  text-decoration: none; display: block;
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
  background: #fff; transition: transform .3s ease, box-shadow .3s ease;
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(26,21,18,.10); }
.news-card figure { aspect-ratio: 16 / 9; overflow: hidden; }
.news-card figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-card:hover figure img { transform: scale(1.04); }
.news-body { padding: 28px 30px 32px; }
.news-date { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.news-body h4 { font-size: 24px; margin: 10px 0 12px; }
.news-body p { color: var(--muted); font-size: 16px; margin-bottom: 18px; }
.news-more { font-weight: 600; font-size: 15px; color: var(--ink); }
.news-more::after { content: " →"; color: var(--gold); }

/* Sitaatit */
.quotes-section { background: var(--paper-deep); }
.quotes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; margin-top: 8px; }
.quote { position: relative; padding-top: 46px; }
.quote::before {
  content: "\201D"; position: absolute; top: -10px; left: -6px;
  font-family: var(--accent); font-style: italic;
  font-size: 110px; line-height: 1; color: var(--gold); opacity: .9;
}
.quote blockquote {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(20px, 2vw, 25px); line-height: 1.4; letter-spacing: -.01em;
}

/* Yhteystiedot + lomake */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; margin-top: 8px; }
.contact-info h3 { font-size: 20px; margin: 34px 0 10px; }
.contact-info h3:first-of-type { margin-top: 0; }
.contact-info p, .contact-info a { color: var(--muted); text-decoration: none; }
.contact-info a:hover { color: var(--ink); }
.contact-info .big-link {
  display: block; font-family: var(--display); font-size: 26px; font-weight: 600;
  color: var(--ink); margin: 2px 0;
}
.contact-info .big-link:hover { color: var(--gold-deep); }
.map-link { font-weight: 600; color: var(--ink) !important; }
.map-link::after { content: " →"; color: var(--gold); }

form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; }
.field .hint { font-size: 13.5px; color: var(--muted); font-weight: 400; }
.field input, .field textarea, .field select {
  font-family: var(--body); font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 3px;
  padding: 13px 15px; transition: border-color .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); }
form .btn { grid-column: 1 / -1; justify-self: start; }
.form-note { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }

/* Pikahakemus — valintanapit */
.choice-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  position: relative; display: inline-flex; align-items: center;
  border: 1px solid var(--line); background: #fff; border-radius: 100px;
  padding: 11px 20px; font-size: 15px; font-weight: 500; cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice:hover { border-color: var(--gold); }
.choice:has(input:checked) { background: var(--ink); color: var(--gold); border-color: var(--ink); }
.choice:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

.apply-card {
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  padding: 46px 48px; box-shadow: 0 24px 60px rgba(26,21,18,.07);
}
.apply-card .apply-head { margin-bottom: 30px; }
.apply-card .apply-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 10px; }
.apply-card .apply-head p { color: var(--muted); }
.apply-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper-deep); color: var(--gold-deep);
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 100px; margin-bottom: 16px;
}

/* Artikkeli */
.article-body { padding: 84px 0 40px; }
.article-body p, .article-body ul, .article-body ol { color: var(--ink-soft); margin-bottom: 22px; }
.article-body h2 { font-size: clamp(24px, 3vw, 32px); margin: 44px 0 14px; }
.article-body h3 { font-size: 22px; margin: 34px 0 12px; }
.article-body ul, .article-body ol { padding-left: 22px; }
.article-body li { margin-bottom: 10px; }
.article-body .lead { font-size: 21px; line-height: 1.55; color: var(--ink); margin-bottom: 30px; }
.article-meta { font-size: 14px; color: var(--muted-on-dark); }
.article-figure { margin: 40px 0; }
.article-figure img { border-radius: 4px; width: 100%; }
.back-link { display: inline-block; margin-bottom: 22px; font-size: 15px; font-weight: 600; text-decoration: none; color: var(--muted-on-dark); }
.back-link::before { content: "← "; color: var(--gold); }
.back-link:hover { color: var(--paper); }

/* CTA-nauha */
.cta-band { background: var(--ink); color: var(--paper); padding: 92px 0; text-align: center; }
.cta-band h2 { font-size: clamp(30px, 4.2vw, 50px); max-width: 20ch; margin: 14px auto 18px; text-wrap: balance; }
.cta-band h2 em { font-family: var(--accent); font-style: italic; font-weight: 500; color: var(--gold); }
.cta-band p { color: var(--muted-on-dark); max-width: 54ch; margin: 0 auto 32px; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: var(--muted-on-dark); padding: 80px 0 36px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 56px; margin-bottom: 64px; }
.footer-grid img.footer-logo { height: 52px; width: auto; margin-bottom: 20px; }
.footer-grid p { max-width: 44ch; }
footer h4 { color: var(--paper); font-size: 16px; margin-bottom: 16px; letter-spacing: .02em; }
footer ul { list-style: none; }
footer li { margin-bottom: 10px; }
footer a { color: var(--muted-on-dark); text-decoration: none; transition: color .2s; }
footer a:hover { color: #fff; }
.footer-badge { height: 48px; width: auto; border-radius: 3px; margin-top: 22px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.10); padding-top: 28px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px;
}

/* ---------- Page transition (osmo: Page Name Transition — Wipe) ---------- */
.transition {
  z-index: 200;
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: clip;
}

.transition__panel {
  background-color: var(--ink);
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
}

.transition__label {
  color: var(--gold);
  text-transform: uppercase;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: .02em;
  font-size: clamp(26px, 5vw, 2.5em);
}
.transition__label span:first-child,
.transition__label span:last-child { opacity: .45; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal, .page-hero .reveal { transition-duration: .9s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .news-card, .news-card figure img { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { gap: 24px; }
  .nav-links a { font-size: 14.5px; }
}
@media (max-width: 960px) {
  section { padding: 80px 0; }
  .page-hero { padding: 132px 0 64px; }
  .intro-grid, .news-grid, .quotes-grid, .contact-grid { grid-template-columns: 1fr; }
  .intro-grid { gap: 44px; }
  .quotes-grid { gap: 48px; }
  .contact-grid { gap: 56px; }
  .service { grid-template-columns: 64px 1fr; }
  .service p { grid-column: 2; }
  .work-grid { grid-template-columns: 1fr; }
  .work-figure { min-height: 380px; }
  .work-figure img { position: static; height: 380px; }
  .work-body { padding: 72px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .apply-card { padding: 34px 26px; }
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; gap: 30px;
    background: rgba(26, 21, 18, .97);
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  .nav-links a { font-size: 22px; }
  .nav-links a.current { border-bottom: 0; }
  .nav.open .nav-links { opacity: 1; pointer-events: auto; z-index: 99; }
  .nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-toggle { display: block; position: relative; z-index: 100; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 14px; }
  form { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
}
