/* 3D Vision – minimalistlik kujundus. Seadme enda kirjatüübid (väliseid fonditeenuseid pole). */
:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --alt: #efebe4;
  --ink: #1d1c1a;
  --muted: #6e6a63;
  --line: #ddd7cc;
  --accent: #8a6a46;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --radius: 2px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); overflow-wrap: break-word; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.narrow { max-width: 680px; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Päis */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(247, 245, 241, 0.92); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-family: var(--serif); font-size: 1.35rem; text-decoration: none; letter-spacing: 0.02em; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a { text-decoration: none; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav .nav-cta { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.nav a[aria-current="page"] { color: var(--ink); }
.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 22px; height: 1.5px; background: var(--ink); position: relative; transition: transform .25s, background .25s; margin: auto; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -7px; } .menu-icon::after { top: 7px; }
.menu-btn[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-icon::before { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon::after { transform: translateY(-7px) rotate(-45deg); }

/* Nupud */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 28px; background: var(--ink); color: #fff; text-decoration: none; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; border: 1px solid var(--ink); border-radius: var(--radius); transition: background .2s, color .2s; cursor: pointer; }
.btn:hover { background: transparent; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Avaosa */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(56px, 8vw, 110px); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.eyebrow { font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 34em; margin-top: 26px; }
.hero-img { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; background: var(--alt); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.hero-img:hover img { transform: scale(1.03); }
.hero-caption { position: absolute; left: 0; bottom: 0; background: var(--bg); padding: 10px 18px 0 0; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.hero-placeholder { aspect-ratio: 4 / 5; background: linear-gradient(160deg, #e9e3d9, #d7cebf); }

/* Avaosa: pilt sama kõrge kui tekst ja hajub servadest taustaks */
.hero-grid { align-items: stretch; gap: clamp(24px, 4vw, 56px); }
.hero-text { align-self: center; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.3rem, 4.4vw, 3.7rem); text-wrap: balance; }
.hero-media { position: relative; min-height: 320px; margin-left: clamp(-48px, -3vw, -24px); }
.hero-img { position: absolute; inset: 0; aspect-ratio: auto; background: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 34%), linear-gradient(to bottom, transparent 0, #000 12%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 34%), linear-gradient(to bottom, transparent 0, #000 12%, #000 86%, transparent 100%);
  mask-composite: intersect; }
.hero-img:hover img { transform: scale(1.02); }
.hero-placeholder { position: absolute; inset: 0; aspect-ratio: auto;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 40%); mask-image: linear-gradient(to right, transparent 0, #000 40%); }

/* Sektsioonid */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-alt { background: var(--alt); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 44px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 8px 16px; font: inherit; font-size: 0.85rem; border-radius: 999px; cursor: pointer; transition: all .2s; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Portfoolio ruudustik */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 28px; }
.card a { text-decoration: none; display: block; }
.card-img { overflow: hidden; aspect-ratio: 4 / 3; background: var(--alt); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.2,1), opacity .4s; }
.card a:hover .card-img img { transform: scale(1.04); }
.card-body { padding-top: 16px; }
.card-body h3 { font-size: 1.25rem; }
.card-body p { margin: 4px 0 0; font-size: 0.85rem; color: var(--muted); letter-spacing: 0.04em; }
.card[hidden] { display: none; }

/* Teenused */
.two-col { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.two-col > div .muted { margin-top: 20px; max-width: 26em; }
.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.services li { display: flex; justify-content: space-between; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.services h3 { font-size: 1.3rem; }
.services p { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; max-width: 32em; }
.price { white-space: nowrap; font-family: var(--serif); font-size: 1.15rem; color: var(--accent); padding-top: 2px; }

/* Minust */
.about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.about-noimg { grid-template-columns: 1fr; max-width: 760px; }
.about-img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--alt); }
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.prose { margin-top: 26px; color: #3b3935; }
.prose p:last-child { margin-bottom: 0; }

/* Kontakt */
.contact { text-align: center; border-top: 1px solid var(--line); }
.contact .lead { margin-inline: auto; }
.contact-list { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 36px; }
.contact-list a, .contact-list span { text-decoration: none; color: var(--muted); }
.contact-list .contact-email { font-family: var(--serif); font-size: clamp(1.5rem, 3.4vw, 2.4rem); color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 4px; transition: border-color .2s; }
.contact-list .contact-email:hover { border-color: var(--ink); }
.social { display: flex; justify-content: center; gap: 28px; margin-top: 30px; }
.social a { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.social a:hover { color: var(--ink); }
.social { align-items: center; }
.social .social-icon { display: inline-grid; place-items: center; color: var(--ink); opacity: .85; transition: opacity .2s; }
.social .social-icon:hover { opacity: 1; }
.social .social-icon img { display: block; filter: grayscale(1); }

/* Projekti leht */
.project { padding: clamp(32px, 6vw, 72px) 0 clamp(64px, 8vw, 110px); }
.back { display: inline-block; text-decoration: none; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 36px; }
.back:hover { color: var(--ink); }
.project-head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 0; }
.meta dt { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.meta dd { margin: 2px 0 0; }
.project-desc { max-width: 720px; margin: 32px 0 0; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
.gallery-item { display: block; grid-column: span 2; overflow: hidden; background: var(--alt); cursor: zoom-in; }
.gallery-item.is-portrait { grid-column: span 1; }
.gallery-item img { width: 100%; transition: opacity .3s; }
.gallery-item.is-solo img { width: auto; max-width: 100%; max-height: 88vh; margin-inline: auto; }
.gallery-item:hover img { opacity: .92; }
.pager { display: flex; justify-content: space-between; gap: 24px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; font-family: var(--serif); font-size: 1.3rem; display: flex; flex-direction: column; gap: 4px; }
.pager a span { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.pager .next { text-align: right; margin-left: auto; }
.project-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 64px; padding: 36px 40px; background: var(--alt); }
.project-cta p { margin: 0; font-family: var(--serif); font-size: 1.5rem; }

/* Alamlehtede päis */
.page-head { padding: clamp(48px, 8vw, 104px) 0 clamp(24px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.page-head .lead { margin-top: 20px; }
.section-tight { padding-top: clamp(36px, 5vw, 64px); }
.filters-bar { margin-bottom: 36px; }
.link-arrow { text-decoration: none; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; border-bottom: 1px solid var(--line); padding-bottom: 3px; transition: border-color .2s; }
.link-arrow:hover { border-color: var(--ink); }
.about-link { margin-top: 28px; }
.cta-band { text-align: center; border-top: 1px solid var(--line); }
.cta-band .lead { margin-inline: auto; }
.cta-band .actions { justify-content: center; }

/* Sertifikaadid */
.certs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.cert { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: start; padding: 28px; background: var(--surface); border: 1px solid var(--line); }
.cert:not(:has(.cert-img)) { grid-template-columns: 1fr; }
.cert-img { display: block; background: var(--alt); cursor: zoom-in; border: 1px solid var(--line); }
.cert-img img { width: 100%; height: auto; transition: opacity .3s; }
.cert-img:hover img { opacity: .9; }
.cert-year { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.cert-title { font-size: 1.45rem; }
.cert-issuer { color: var(--muted); margin: 8px 0 0; }
.cert-desc { margin-top: 14px; font-size: 0.95rem; color: #3b3935; }
.cert-desc p:last-child { margin-bottom: 0; }

/* Kontaktileht */
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(36px, 7vw, 110px); align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field span { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.field em { font-style: normal; text-transform: none; letter-spacing: 0; }
.field input, .field textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; width: 100%; transition: border-color .2s; }
.field textarea { resize: vertical; min-height: 160px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.contact-form .btn { align-self: flex-start; }
.form-note { font-size: 0.85rem; color: var(--muted); margin: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 24px 28px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 24px; }
.notice p { margin: 0; }
.notice p + p { margin-top: 6px; }
.notice-ok h2 { font-size: 1.8rem; margin-bottom: 12px; }
.notice-ok p { color: var(--muted); margin-bottom: 24px; }
.notice-error { border-color: #e2b8b0; background: #fbf1ef; color: #8f3324; }
.contact-aside { display: flex; flex-direction: column; gap: 28px; padding-top: 8px; border-top: 1px solid var(--ink); }
.contact-aside > div { padding-top: 20px; }
.aside-label { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.aside-value { font-family: var(--serif); font-size: 1.35rem; text-decoration: none; margin: 0; word-break: break-word; }
a.aside-value:hover { text-decoration: underline; text-underline-offset: 4px; }
.social-left { justify-content: flex-start; margin-top: 4px; }
.footer-meta a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.footer-meta a:hover { color: var(--ink); border-color: var(--ink); }

/* Pildivaatur */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(20, 19, 17, 0.96); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; max-width: 92vw; max-height: 88vh; text-align: center; }
.lb-figure img { max-width: 92vw; max-height: 82vh; width: auto; height: auto; margin: auto; }
.lb-figure figcaption { color: #bdb7ad; font-size: 0.82rem; letter-spacing: 0.08em; margin-top: 14px; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.6rem; line-height: 1; width: 64px; height: 64px; cursor: pointer; opacity: .75; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* Jalus */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; color: var(--muted); }
.footer-inner p { margin: 0; }
.footer-name { font-family: var(--serif); color: var(--ink); font-size: 1rem; }
.footer-name span { color: var(--muted); font-family: var(--sans); font-size: 0.85rem; }

/* Sujuv ilmumine kerimisel */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* Tahvel ja telefon */
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 20px; }
  .two-col, .project-head { grid-template-columns: 1fr; }
  .certs { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { width: min(var(--wrap), 100% - 36px); }
  .menu-btn { display: block; }
  .nav { position: fixed; inset: 72px 0 auto 0; background: var(--bg); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 18px 24px; border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .25s; }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
  .nav .nav-cta { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
  .hero-grid, .about { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .about-img { aspect-ratio: 4 / 3; }
  .hero-media { margin-left: 0; min-height: 0; }
  .hero-img, .hero-placeholder { position: relative; inset: auto; aspect-ratio: 4 / 3;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%); mask-image: linear-gradient(to bottom, #000 70%, transparent 100%); }
  .grid { grid-template-columns: 1fr; }
  .services li { flex-direction: column; gap: 8px; }
  .gallery { grid-template-columns: 1fr; gap: 12px; }
  .gallery-item, .gallery-item.is-portrait { grid-column: span 1; }
  .meta { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .cert { grid-template-columns: 110px 1fr; gap: 18px; padding: 20px; }
  .cert-title { font-size: 1.2rem; }
  .project-cta { padding: 28px 22px; }
  .pager a { font-size: 1.1rem; }
}
