/*
Theme Name: TeippiNova
Theme URI: https://teippinova.fi/
Author: TeippiNova Ky
Description: TeippiNova Ky:n mukautettu yhden sivun WordPress-teema.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: teippinova
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --blue: #18296b;
  --blue-deep: #101b4c;
  --blue-light: #2d4493;
  --cream: #f2f0e9;
  --paper: #fbfaf6;
  --ink: #151923;
  --muted: #616672;
  --line: #d9d9d3;
  --accent: #ffb000;
  --white: #fff;
  --container: min(1180px, calc(100vw - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.container { width: var(--container); margin-inline: auto; }
.section { padding-block: 120px; }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  padding: 12px 18px; background: var(--white); color: var(--blue);
}
.skip-link:focus { top: 12px; }

.site-header {
  position: absolute; inset: 0 0 auto; z-index: 10;
  color: var(--white); border-bottom: 1px solid rgba(255,255,255,.22);
}
.header-inner { height: 94px; display: flex; align-items: center; gap: 56px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-mark {
  display: grid; place-items: center; width: 44px; aspect-ratio: 1;
  border: 2px solid currentColor; border-radius: 50%;
  font: 800 13px/1 "Manrope", sans-serif; letter-spacing: -.07em;
}
.brand-name { font: 700 23px/1 "Manrope", sans-serif; letter-spacing: -.055em; }
.brand-name span { color: var(--accent); }
nav { display: flex; align-items: center; gap: 34px; margin-left: auto; }
nav a { position: relative; font-size: 14px; font-weight: 600; }
nav a::after {
  content: ""; position: absolute; left: 0; bottom: -8px; width: 100%; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .25s ease;
}
nav a:hover::after, nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.header-call { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; }
.header-call svg { width: 18px; fill: var(--accent); }

.hero { position: relative; min-height: 820px; height: min(92vh, 940px); overflow: hidden; background: var(--blue-deep); color: var(--white); }
.hero-photo {
  position: absolute; inset: 0; left: 37%;
  background: url('images/hero-teippaus.webp') center / cover no-repeat;
  transform: scale(1.02);
}
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--blue-deep) 0%, rgba(16,27,76,.98) 31%, rgba(16,27,76,.73) 58%, rgba(16,27,76,.15) 100%);
}
.hero-content { position: relative; z-index: 1; display: flex; align-items: center; height: 100%; padding-top: 70px; }
.hero-copy { max-width: 760px; }
.eyebrow {
  margin: 0 0 24px; color: var(--accent); font: 700 12px/1.4 "Manrope", sans-serif;
  letter-spacing: .16em; text-transform: uppercase;
}
.eyebrow.dark { color: var(--blue-light); }
h1, h2, h3 { margin: 0; font-family: "Manrope", sans-serif; letter-spacing: -.055em; }
h1 { font-size: clamp(58px, 6.7vw, 100px); line-height: .96; font-weight: 700; }
h2 { font-size: clamp(44px, 5.1vw, 72px); line-height: 1.02; font-weight: 700; }
h3 { font-size: 25px; line-height: 1.15; }
.hero-lead { max-width: 625px; margin: 32px 0 0; color: rgba(255,255,255,.79); font-size: 20px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: 16px; min-height: 58px;
  padding: 0 27px; border: 1px solid transparent; border-radius: 2px; cursor: pointer;
  font-family: "Manrope", sans-serif; font-size: 14px; font-weight: 700; transition: .2s ease;
}
.button-primary { background: var(--accent); color: var(--ink); }
.button-primary:hover { background: #ffc13c; transform: translateY(-2px); }
.button-ghost { border-color: rgba(255,255,255,.45); color: var(--white); }
.button-ghost:hover { background: var(--white); color: var(--blue-deep); }
.hero-note {
  position: absolute; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 17px;
  min-height: 72px; padding-inline: 38px; background: var(--paper); color: var(--ink);
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.hero-note i { width: 22px; height: 1px; background: #a3a49e; }

.intro { background: var(--cream); }
.intro-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 11%; align-items: end; }
.intro-copy { border-left: 1px solid #c8c7c0; padding-left: 56px; }
.intro-copy p { margin: 0 0 34px; color: #4f535d; font-size: 18px; line-height: 1.75; }
.text-link { display: inline-flex; gap: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--ink); font-weight: 700; }
.text-link span { color: var(--blue-light); }

.services { background: var(--paper); }
.section-heading { display: grid; grid-template-columns: 1fr 360px; gap: 60px; align-items: end; margin-bottom: 64px; }
.section-heading > p { margin: 0 0 8px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.service-card {
  position: relative; min-height: 280px; display: flex; flex-direction: column; justify-content: space-between;
  padding: 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden;
  transition: color .3s ease, background .3s ease;
}
.service-card::before {
  content: ""; position: absolute; inset: auto 0 0; height: 5px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.service-card:hover { background: var(--blue); color: var(--white); }
.service-card:hover::before { transform: scaleX(1); }
.service-card.featured { background: var(--blue); color: var(--white); }
.service-card.featured::before { transform: scaleX(1); }
.service-number { color: #92959b; font-size: 12px; font-weight: 700; }
.service-card div { max-width: 430px; }
.service-card p { margin: 15px 0 0; color: var(--muted); line-height: 1.65; transition: color .3s ease; }
.service-card:hover p, .service-card.featured p { color: rgba(255,255,255,.72); }
.card-arrow { position: absolute; right: 32px; top: 28px; color: var(--blue); font-size: 24px; }
.service-card:hover .card-arrow, .service-card.featured .card-arrow { color: var(--accent); }
.service-card:last-child { grid-column: span 2; min-height: 230px; }

.work { background: var(--blue-deep); color: var(--white); }
.section-heading.light > p { color: rgba(255,255,255,.62); }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 9px; margin: -20px 0 38px; }
.gallery-filters button {
  min-height: 42px; padding: 0 18px; border: 1px solid rgba(255,255,255,.28); border-radius: 100px;
  background: transparent; color: rgba(255,255,255,.72); cursor: pointer; font-size: 13px; font-weight: 700;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.gallery-filters button:hover { border-color: var(--white); color: var(--white); }
.gallery-filters button.active { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-item { position: relative; aspect-ratio: 4 / 3; margin: 0; overflow: hidden; background: var(--blue); }
.gallery-item[hidden] { display: none; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.gallery-item:hover img { transform: scale(1.035); }
.gallery-item::after { content: ""; position: absolute; inset: 48% 0 0; background: linear-gradient(transparent, rgba(7,12,35,.9)); }
.gallery-item figcaption { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 22px; display: grid; gap: 4px; }
.gallery-item figcaption span { color: var(--accent); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.gallery-item figcaption strong { font: 600 20px/1.2 "Manrope", sans-serif; }
.gallery-item figcaption small { color: rgba(255,255,255,.58); font-size: 10px; }

.process { background: var(--cream); }
.process-intro { max-width: 720px; margin-bottom: 70px; }
.process-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid #c9c9c2; }
.process-list li { display: grid; grid-template-columns: 100px 1fr; padding: 38px 0; border-bottom: 1px solid #c9c9c2; }
.process-list li > span { color: var(--blue-light); font-size: 13px; font-weight: 700; }
.process-list li div { display: grid; grid-template-columns: 330px 1fr; gap: 60px; }
.process-list h3 { font-size: 27px; }
.process-list p { max-width: 480px; margin: 0; color: var(--muted); line-height: 1.65; }

.contact { background: var(--blue); color: var(--white); }
.contact-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 11%; }
.contact-copy > p:not(.eyebrow) { max-width: 500px; margin: 28px 0 0; color: rgba(255,255,255,.7); font-size: 18px; line-height: 1.7; }
.contact-person { display: flex; flex-direction: column; align-items: flex-start; margin-top: 50px; }
.contact-person span { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.contact-person strong { margin: 8px 0 17px; font: 600 23px "Manrope", sans-serif; }
.contact-person a { margin-top: 5px; color: rgba(255,255,255,.82); border-bottom: 1px solid transparent; }
.contact-person a:hover { border-color: var(--accent); }
.contact-form { padding: 46px; background: var(--white); color: var(--ink); }
.field-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.contact-form label { display: grid; gap: 10px; margin-bottom: 20px; color: #555a66; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.contact-form input, .contact-form textarea {
  width: 100%; border: 0; border-bottom: 1px solid #c9cad0; border-radius: 0; outline: 0;
  padding: 11px 0 13px; background: transparent; color: var(--ink); font-size: 16px; text-transform: none; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--blue-light); box-shadow: 0 1px var(--blue-light); }
.contact-form textarea::placeholder { color: #a1a3a9; }
.button-accent { width: 100%; margin-top: 8px; background: var(--accent); color: var(--ink); }
.button-accent:hover { background: #ffc13c; }
.form-note { margin: 12px 0 0; color: #7a7d84; font-size: 12px; text-align: center; }

footer { background: #0b1233; color: var(--white); }
.footer-main { display: grid; grid-template-columns: 1fr 1fr auto; align-items: start; gap: 60px; padding-block: 75px; }
.footer-main p { margin: 0; color: rgba(255,255,255,.6); line-height: 1.65; }
.footer-links { display: grid; gap: 12px; font-size: 14px; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; padding-block: 20px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.44); font-size: 12px; }
.footer-bottom a:hover { color: var(--white); }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  :root { --container: min(100% - 36px, 700px); }
  .section { padding-block: 88px; }
  .header-inner { height: 78px; }
  nav { display: none; }
  .header-call { margin-left: auto; }
  .hero { min-height: 740px; height: 92svh; }
  .hero-photo { left: 0; opacity: .54; }
  .hero-shade { background: linear-gradient(90deg, rgba(16,27,76,.98), rgba(16,27,76,.67)); }
  .hero-content { padding-top: 45px; }
  .hero-copy { max-width: 650px; }
  .hero-lead { font-size: 18px; }
  .hero-note { display: none; }
  .intro-grid, .section-heading, .contact-grid { grid-template-columns: 1fr; gap: 42px; }
  .intro-copy { padding: 0; border-left: 0; }
  .section-heading { margin-bottom: 48px; }
  .section-heading > p { max-width: 540px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .process-list li div { grid-template-columns: 240px 1fr; gap: 30px; }
}

@media (max-width: 600px) {
  :root { --container: calc(100% - 28px); }
  .section { padding-block: 72px; }
  .brand-mark { width: 38px; }
  .brand-name { font-size: 20px; }
  .header-call span { display: none; }
  .header-call { width: 42px; height: 42px; justify-content: center; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; }
  h1 { font-size: clamp(48px, 15.2vw, 68px); }
  h2 { font-size: 42px; }
  .hero { min-height: 700px; }
  .hero-content { align-items: flex-end; padding-bottom: 66px; }
  .hero-lead { margin-top: 24px; font-size: 16px; line-height: 1.55; }
  .hero-actions { margin-top: 30px; }
  .button { min-height: 54px; padding-inline: 21px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card, .service-card:last-child { grid-column: auto; min-height: 245px; padding: 26px; }
  .card-arrow { right: 26px; top: 22px; }
  .gallery-filters { flex-wrap: nowrap; margin-inline: -14px; padding-inline: 14px; overflow-x: auto; scrollbar-width: none; }
  .gallery-filters::-webkit-scrollbar { display: none; }
  .gallery-filters button { flex: 0 0 auto; }
  .gallery { grid-template-columns: 1fr; gap: 14px; }
  .gallery-item figcaption { left: 22px; bottom: 21px; }
  .process-intro { margin-bottom: 45px; }
  .process-list li { grid-template-columns: 42px 1fr; padding-block: 30px; }
  .process-list li div { grid-template-columns: 1fr; gap: 12px; }
  .process-list h3 { font-size: 23px; }
  .contact-form { padding: 28px 20px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .footer-main { grid-template-columns: 1fr; gap: 32px; padding-block: 55px; }
  .footer-bottom { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
