/*
Theme Name: Ehitor
Theme URI: https://ehitor.ee/
Author: Ehitor OÜ
Author URI: https://ehitor.ee/
Description: Ehitor OÜ kohandatud ühe lehega WordPressi teema.
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: ehitor
*/

:root {
  --ink: #171716;
  --paper: #efede6;
  --white: #f8f7f2;
  --orange: #e96f34;
  --line: rgba(23, 23, 22, 0.24);
  --muted: #6c6b66;
  --display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: Aptos, "Segoe UI", Arial, sans-serif;
  --small: 20px;
  --body-text: 25px;
  --service-title: 20px;
  --service-description: 20px;
  --project-title: 16px;
  --project-type: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.ehitor-site { background: var(--paper); color: var(--ink); font-family: var(--body); margin: 0; -webkit-font-smoothing: antialiased; }
.ehitor-site a { color: inherit; text-decoration: none; }
.ehitor-site img { display: block; max-width: 100%; }
.ehitor-site h1, .ehitor-site h2, .ehitor-site h3, .ehitor-site p { margin-top: 0; }
.screen-reader-text { clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; width: 1px; word-wrap: normal !important; }

.site-header {
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.35);
  color: white;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  height: 100px;
  left: 0;
  padding: 0 3.2vw;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 10;
}
.admin-bar .site-header { top: 32px; }
.brand { width: 340px; }
.site-header nav { display: flex; gap: 2.2rem; }
.site-header nav a, .header-mail { font-size: calc(var(--small) * .75); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.site-header nav a { color: rgba(255,255,255,.7); transition: color 180ms ease; }
.site-header nav a:hover { color: white; }
.header-mail { justify-self: end; }

.hero { color: white; min-height: 900px; overflow: hidden; position: relative; }
.hero-image { height: 100%; inset: 0; object-fit: cover; position: absolute; width: 100%; }
.hero-shade { background: linear-gradient(180deg,rgba(8,8,8,.38),rgba(8,8,8,.05) 38%,rgba(8,8,8,.76)); inset: 0; position: absolute; }
.hero-fields { font-size: var(--small); font-weight: 700; left: 3.2vw; letter-spacing: .14em; position: absolute; text-transform: uppercase; top: 155px; }
.hero-field-part i { color: var(--orange); font-style: normal; margin: 0 .65rem; }
.hero-copy { bottom: 7.5rem; left: 3.2vw; max-width: 1200px; position: absolute; right: 3.2vw; z-index: 2; }
.eyebrow { font-size: var(--small); font-weight: 700; letter-spacing: .14em; margin-bottom: 2rem; text-transform: uppercase; }
.hero h1 { font-family: var(--display); font-size: clamp(4.8rem,9.7vw,11.5rem); font-weight: 400; letter-spacing: -.075em; line-height: .78; margin: 0; }
.hero-intro { align-items: end; display: grid; gap: 3rem; grid-template-columns: minmax(280px,540px) auto; justify-content: space-between; margin-top: 3.5rem; }
.hero-intro p { color: rgba(255,255,255,.74); font-size: var(--body-text); line-height: 1.5; margin: 0; }
.hero-intro a { border-bottom: 1px solid rgba(255,255,255,.65); font-size: var(--small); font-weight: 700; letter-spacing: .12em; padding-bottom: .55rem; text-transform: uppercase; }
.hero-intro a span { color: var(--orange); margin-left: 2rem; }
.photo-credit { bottom: 1.4rem; color: rgba(255,255,255,.68); font-size: .525rem; letter-spacing: .07em; position: absolute; right: 3.2vw; text-transform: uppercase; z-index: 2; }

.section { padding: 9rem 7.5vw; }
.section-number { color: var(--muted); font-size: var(--small); font-weight: 700; letter-spacing: .08em; line-height: 1.2; margin: 0; text-transform: uppercase; }
.intro { display: grid; gap: 6vw; grid-template-columns: .35fr 1.65fr; }
.intro > div { max-width: 1200px; }
.intro h2, .section-heading h2, .projects-heading h2, .process h2 { font-family: var(--display); font-size: clamp(3.3rem,6vw,7.5rem); font-weight: 400; letter-spacing: -.065em; line-height: .93; margin: 0; }
.intro-text { color: var(--muted); font-size: var(--body-text); line-height: 1.55; margin: 3rem 0 0 auto; max-width: 760px; }

.stats { border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3,1fr); margin: 0 7.5vw; }
.stats article { border-right: 1px solid var(--line); min-height: 300px; padding: 2rem 2rem 2.2rem; }
.stats article:first-child { border-left: 1px solid var(--line); }
.stats strong { align-items: flex-start; display: flex; font-family: var(--display); font-size: clamp(5rem,9vw,10rem); font-weight: 300; height: clamp(5.5rem,9vw,10rem); letter-spacing: -.08em; line-height: .9; }
.stats article:last-child { text-align: center; }
.stats strong.stats-word { align-items: center; font-size: clamp(2rem,3.25vw,4.5rem); justify-content: center; letter-spacing: -.05em; line-height: .95; white-space: nowrap; width: 100%; }
.stats p { color: var(--muted); font-size: var(--small); font-weight: 700; letter-spacing: .12em; margin: 1.5rem 0 0; text-transform: uppercase; }

.services { display: grid; gap: 6vw; grid-template-columns: .35fr 1.65fr; }
.services-content { min-width: 0; }
.section-heading { align-items: end; display: grid; gap: 5vw; grid-template-columns: 1fr .55fr; margin-bottom: 5rem; }
.section-heading > p { color: var(--muted); font-size: var(--body-text); line-height: 1.5; margin: 0 0 .5rem; }
.services-list { border-top: 1px solid var(--line); }
.services-list article { align-items: start; border-bottom: 1px solid var(--line); display: grid; gap: 2rem; grid-template-columns: 56px 1fr 1fr; padding: 2.6rem 0; }
.services-list article > span { color: var(--orange); font-size: var(--small); font-weight: 700; letter-spacing: .08em; line-height: 1.2; }
.services-list h3 { font-family: var(--display); font-size: var(--service-title); font-weight: 400; letter-spacing: -.035em; line-height: 1.15; margin: 0; }
.services-list article p { color: var(--muted); font-size: var(--service-description); line-height: 1.45; margin: 0; }

.scope { background: var(--ink); color: white; display: grid; grid-template-columns: 1fr 1fr; padding: 5rem 7.5vw; }
.scope > div { border-right: 1px solid rgba(255,255,255,.22); padding: 1rem 5vw 1rem 0; }
.scope > div:last-child { border-right: 0; padding-left: 5vw; }
.scope-label { color: var(--orange); font-size: var(--small); font-weight: 700; letter-spacing: .13em; margin-bottom: 2rem; text-transform: uppercase; }
.scope div > p:last-child { font-family: var(--display); font-size: clamp(1.5625rem,2.25vw,2.7rem); font-weight: 400; letter-spacing: -.035em; line-height: 1.35; margin: 0; }

.projects { background: var(--white); }
.projects-heading { align-items: end; display: grid; gap: 5vw; grid-template-columns: 1fr .55fr; margin: 4.5rem 0 5rem; }
.projects-heading > p { color: var(--muted); font-size: var(--body-text); line-height: 1.5; margin: 0; }
.project-grid { display: grid; gap: 2.4rem .8rem; grid-template-columns: repeat(6,minmax(0,1fr)); }
.project-image-wrap { aspect-ratio: 4/3; background: #ddd; overflow: hidden; position: relative; }
.project-image-button { border: 0; cursor: zoom-in; display: block; padding: 0; text-align: left; width: 100%; }
.project-image-wrap img { filter: grayscale(1) contrast(1.04); height: 100%; object-fit: cover; transition: filter 450ms ease,transform 650ms cubic-bezier(.2,.65,.3,1); width: 100%; }
.project-card:hover img { filter: grayscale(0) contrast(1); transform: scale(1.025); }
.project-image-button:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.project-zoom-label { background: rgba(23,23,22,.9); bottom: .7rem; color: white; font-size: var(--small); font-weight: 700; letter-spacing: .1em; opacity: 0; padding: .65rem .8rem; position: absolute; right: .7rem; text-transform: uppercase; transform: translateY(.35rem); transition: opacity 180ms ease,transform 180ms ease; }
.project-card:hover .project-zoom-label, .project-image-button:focus-visible .project-zoom-label { opacity: 1; transform: translateY(0); }
.project-meta { border-top: 1px solid var(--line); display: grid; gap: .4rem 1rem; grid-template-columns: 32px 1fr; margin-top: 1rem; padding-top: .9rem; }
.project-meta > span { color: var(--orange); font-size: var(--small); font-weight: 700; grid-row: span 2; letter-spacing: .09em; }
.project-meta h3 { font-family: var(--display); font-size: var(--project-title); font-weight: 500; letter-spacing: -.025em; line-height: 1.2; margin: 0; }
.project-meta p { color: var(--muted); font-size: var(--project-type); font-weight: 700; letter-spacing: .1em; margin: 0; text-transform: uppercase; }

.ehitor-lightbox { align-items: center; backdrop-filter: blur(10px); background: rgba(0,0,0,.86); display: flex; inset: 0; justify-content: center; padding: 3vh 3vw; position: fixed; z-index: 99999; }
.ehitor-lightbox[hidden] { display: none; }
.lightbox-panel { background: #111; max-height: 94vh; max-width: min(94vw,1600px); overflow: hidden; position: relative; width: 94vw; }
.lightbox-image-frame { align-items: center; background: #111; display: flex; height: min(78vh,980px); justify-content: center; }
.lightbox-image-frame img { height: 100%; object-fit: contain; width: 100%; }
.lightbox-footer { align-items: center; color: white; display: flex; justify-content: space-between; min-height: 78px; padding: 1rem 1.25rem; }
.lightbox-footer div { display: grid; gap: .25rem; }
.lightbox-footer strong { font-family: var(--display); font-size: var(--project-title); font-weight: 500; }
.lightbox-footer span { color: rgba(255,255,255,.68); font-size: var(--project-type); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.lightbox-close, .lightbox-nav { align-items: center; background: rgba(17,17,17,.86); border: 1px solid rgba(255,255,255,.35); color: white; cursor: pointer; display: flex; font-family: Arial,sans-serif; justify-content: center; position: absolute; transition: background 180ms ease,border-color 180ms ease; }
.lightbox-close:hover, .lightbox-nav:hover { background: var(--orange); border-color: var(--orange); }
.lightbox-close:focus-visible, .lightbox-nav:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.lightbox-close { font-size: 1.9rem; height: 48px; line-height: 1; right: 1rem; top: 1rem; width: 48px; }
.lightbox-nav { font-size: 2.5rem; height: 64px; top: calc(50% - 56px); width: 50px; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
body.ehitor-lightbox-open { overflow: hidden; }

.process { display: grid; gap: 6vw; grid-template-columns: .35fr 1.65fr; }
.process-content { display: grid; gap: 6vw; grid-template-columns: 1fr .55fr; }
.process-content > p { align-self: end; color: var(--muted); font-size: var(--body-text); line-height: 1.5; margin: 0 0 .5rem; }

.contact { background: var(--orange); display: grid; gap: 5vw; grid-template-columns: .35fr 1.05fr .6fr; padding: 7rem 7.5vw; }
.contact .section-number { color: rgba(23,23,22,.62); }
.contact-main > p { font-size: var(--small); font-weight: 700; letter-spacing: .13em; margin-bottom: 2rem; text-transform: uppercase; }
.contact-main > a { border-bottom: 2px solid var(--ink); display: inline-flex; font-family: var(--display); font-size: clamp(3rem,5.5vw,7rem); font-weight: 400; letter-spacing: -.065em; line-height: .95; padding-bottom: .3rem; }
.contact-main > a span { font-size: .4em; margin-left: 2rem; }
.contact address { align-self: end; font-style: normal; }
.contact address > div { border-top: 1px solid rgba(23,23,22,.35); display: grid; gap: .6rem; padding: 1rem 0; }
.contact address > div:last-child { border-bottom: 1px solid rgba(23,23,22,.35); }
.contact address span { font-size: var(--small); font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.contact address a { font-family: var(--display); font-size: var(--body-text); line-height: 1.3; }
.contact-phone-row { min-height: 124px; }
.contact-phone-content { align-items: center; display: flex; gap: 1.2rem; justify-content: space-between; }
.contact-phone-qr { align-items: center; align-self: center; display: flex; gap: .6rem; margin: 0; }
.ehitor-qr-code, .ehitor-qr-code svg { display: block; height: 88px; width: 88px; }
.contact-phone-qr figcaption { font-size: var(--small); font-style: normal; font-weight: 700; letter-spacing: .08em; line-height: 1.35; max-width: 10rem; text-transform: uppercase; }

footer { align-items: center; background: var(--ink); color: rgba(255,255,255,.56); display: grid; font-size: calc(var(--small) * .75); gap: 1.5rem; grid-template-columns: 1fr 1fr auto auto; letter-spacing: .11em; padding: 2rem 3.2vw; text-transform: uppercase; }
footer img { width: 300px; }
footer p { margin: 0; }
footer a { color: white; }

@media (max-width: 1300px) {
  .project-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

@media (max-width: 1000px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .intro, .services, .process { grid-template-columns: .25fr 1.75fr; }
  .services-list article { grid-template-columns: 56px 1fr; }
  .services-list article p { grid-column: 2; }
  .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .contact { grid-template-columns: .25fr 1.2fr .55fr; }
  footer { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

@media (max-width: 720px) {
  .site-header { height: 80px; padding: 0 1.25rem; }
  .brand { width: 230px; }
  .header-mail { font-size: calc(var(--small) * .75); }
  .hero { min-height: 780px; }
  .hero-fields { left: 1.25rem; top: 120px; }
  .hero-copy { bottom: 5rem; left: 1.25rem; right: 1.25rem; }
  .hero h1 { font-size: clamp(4rem,19vw,6.5rem); line-height: .84; }
  .hero-intro { align-items: start; grid-template-columns: 1fr; margin-top: 2.5rem; }
  .hero-intro a { justify-self: start; }
  .photo-credit { bottom: 1rem; right: 1.25rem; }
  .section { padding: 6rem 1.25rem; }
  .intro, .services, .process { display: block; }
  .section-number { margin-bottom: 3.5rem; }
  .intro h2, .section-heading h2, .projects-heading h2, .process h2 { font-size: clamp(3.2rem,15vw,5.4rem); }
  .stats { display: block; margin: 0 1.25rem; }
  .stats article, .stats article:first-child { border-left: 1px solid var(--line); min-height: 230px; }
  .section-heading, .projects-heading, .process-content { display: block; }
  .section-heading > p, .projects-heading > p, .process-content > p { margin-top: 2.5rem; }
  .services-list article { gap: 1rem; grid-template-columns: 52px 1fr; }
  .scope { grid-template-columns: 1fr; padding: 4rem 1.25rem; }
  .scope > div, .scope > div:last-child { border-bottom: 1px solid rgba(255,255,255,.22); border-right: 0; padding: 2rem 0; }
  .project-grid { grid-template-columns: 1fr; }
  .project-zoom-label { opacity: 1; transform: none; }
  .ehitor-lightbox { padding: .5rem; }
  .lightbox-panel { max-height: 96vh; width: calc(100vw - 1rem); }
  .lightbox-image-frame { height: calc(96vh - 88px); }
  .lightbox-footer { min-height: 88px; padding: .9rem 1rem; }
  .lightbox-nav { height: 52px; top: calc(50% - 50px); width: 44px; }
  .lightbox-prev { left: .5rem; }
  .lightbox-next { right: .5rem; }
  .lightbox-close { right: .5rem; top: .5rem; }
  .contact { display: block; padding: 5rem 1.25rem; }
  .contact-main > a { font-size: clamp(2.8rem,15vw,5rem); }
  .contact address { margin-top: 4rem; }
  .contact-phone-row { min-height: 116px; }
  footer { grid-template-columns: 1fr; padding: 2rem 1.25rem; }
  footer img { width: 220px; }
  footer p { display: none; }
}

@media (max-width: 520px) {
  .site-header { grid-template-columns: 1fr; }
  .header-mail { display: none; }
  .contact-phone-content { align-items: flex-start; flex-wrap: wrap; min-width: 0; width: 100%; }
  .contact-phone-qr { justify-content: flex-start; max-width: 100%; width: 100%; }
}

@media (hover: none) {
  .project-image-wrap img { filter: grayscale(.55); }
}

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