/* =========================================================
   Võlupintsel OÜ
   Palett on tuletatud logost: sügav sinine ja tsüaan.
   Taust on soe kreem, et ehitusfotod ei mõjuks külmalt.
   ========================================================= */

/* ---------- Fondid ---------- */
@font-face {
  font-family: 'Karla';
  src: url('/fondid/karla-latin-ext.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Karla';
  src: url('/fondid/karla-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fondid/fraunces-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fondid/fraunces-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Muutujad ---------- */
:root {
  --kreem: #FBF5EC;
  --liiv: #F3E9DA;
  --liiv-tume: #E7D9C4;
  --valge: #FFFFFF;

  --tint: #241F1A;
  --tekst: #443C33;
  --tekst-hell: #5F564B;

  --sinine: #1E2FB8;
  --sinine-tume: #141C7A;
  --tsuaan: #0B6E93;

  --oiglus: 1200px;
  --raadius: 14px;
  --raadius-suur: 22px;
  --vari: 0 1px 2px rgba(36, 31, 26, .06), 0 8px 24px rgba(36, 31, 26, .08);
  --vari-sygav: 0 2px 6px rgba(36, 31, 26, .08), 0 18px 46px rgba(36, 31, 26, .14);
}

/* ---------- Alus ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--kreem);
  color: var(--tekst);
  font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-optical-sizing: auto;
  color: var(--tint);
  line-height: 1.16;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.35rem); font-weight: 700; }
h2 { font-size: clamp(1.65rem, 3.8vw, 2.45rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); font-weight: 600; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--sinine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--sinine-tume); }

:focus-visible {
  outline: 3px solid var(--tsuaan);
  outline-offset: 3px;
  border-radius: 4px;
}

.raam {
  width: min(100% - 2.5rem, var(--oiglus));
  margin-inline: auto;
}

.jata-vahele {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--sinine);
  color: var(--valge);
  padding: .75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 var(--raadius) 0;
}
.jata-vahele:focus { left: 0; }

/* ---------- Pintslitõmme, lehe kujunduslik eripära ---------- */
/* Pealkirja all olev kaldus värvitõmme, mis kordab logo pintslikaart. */
.pintsel-alla {
  position: relative;
  display: inline-block;
}
.pintsel-alla::after {
  content: '';
  position: absolute;
  left: -.12em;
  right: -.12em;
  bottom: -.22em;
  height: .34em;
  background: linear-gradient(95deg, #3FC9F2 0%, #2A3BE0 55%, #161B7E 100%);
  border-radius: 50% 50% 46% 54% / 100% 100% 100% 100%;
  clip-path: polygon(1% 22%, 12% 4%, 34% 16%, 58% 2%, 79% 18%, 96% 6%, 100% 44%, 92% 92%, 66% 78%, 40% 96%, 16% 76%, 3% 90%);
  opacity: .92;
}
.pintsel-alla-hele::after {
  background: linear-gradient(95deg, #7FE0FF 0%, #6A7BFF 55%, #A9B6FF 100%);
}

/* ---------- Päis ---------- */
.pais {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 245, 236, .93);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--liiv-tume);
}
.pais-sisu {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 74px;
  padding-block: .5rem;
}
.pais-logo { display: block; line-height: 0; margin-right: auto; }
.pais-logo img { width: 128px; height: auto; }

.peamenuu ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: .25rem;
  margin: 0;
  padding: 0;
}
.peamenuu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .85rem;
  border-radius: 999px;
  color: var(--tekst);
  font-weight: 600;
  font-size: .97rem;
  text-decoration: none;
}
.peamenuu a:hover { background: var(--liiv); color: var(--sinine-tume); }
.peamenuu a.menuu-esile {
  background: var(--sinine);
  color: var(--valge);
  padding-inline: 1.15rem;
}
.peamenuu a.menuu-esile:hover { background: var(--sinine-tume); color: var(--valge); }

.menuu-nupp {
  display: none;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  min-width: 44px;
  padding: .4rem .9rem;
  border: 1px solid var(--liiv-tume);
  border-radius: 999px;
  background: var(--valge);
  color: var(--tint);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.menuu-nupp-triibud { display: grid; gap: 4px; }
.menuu-nupp-triibud span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--tint);
  border-radius: 2px;
}

/* ---------- Nupud ---------- */
.nupurida { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.nupurida-kesk { justify-content: center; margin-top: 2.5rem; }

.nupp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: .5rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease;
}
.nupp:hover { transform: translateY(-2px); }
.nupp-esile { background: var(--sinine); color: var(--valge); }
.nupp-esile:hover { background: var(--sinine-tume); color: var(--valge); }
.nupp-teine {
  background: transparent;
  color: var(--sinine-tume);
  border: 2px solid var(--sinine);
}
.nupp-teine:hover { background: rgba(30, 47, 184, .08); color: var(--sinine-tume); }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 4.75rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero-raam {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
.kicker {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tsuaan);
  margin-bottom: 1rem;
}
.hero-lause { font-size: 1.13rem; color: var(--tekst); max-width: 34em; }
.hero-slogan {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 600;
  font-style: italic;
  color: var(--tint);
  margin-top: 1.6rem;
}

.hero-pilt { margin: 0; }
.hero-pilt img {
  width: 100%;
  border-radius: var(--raadius-suur);
  box-shadow: var(--vari-sygav);
}
.hero-pilt figcaption,
.puit-pilt figcaption {
  margin-top: .75rem;
  font-size: .9rem;
  color: var(--tekst-hell);
}

/* ---------- Lõigud ---------- */
.lohk { padding: clamp(3rem, 7vw, 5.25rem) 0; }
.lohk-liiv { background: var(--liiv); }
.lohk-pealkiri { margin-bottom: 1.1rem; }
.lohk-sisse { max-width: 62ch; color: var(--tekst); font-size: 1.08rem; margin-bottom: 2.5rem; }
.lohk-sisse-kitsas { margin-bottom: 1.75rem; }
.lohk-jarel { margin-top: 2rem; color: var(--tekst-hell); }

/* ---------- Teenusekaardid ---------- */
.kaardid {
  display: grid;
  /* Kolm veergu, sest teenuseid on kuus ja nii tekib täis 3x2 ruudustik */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.kaart {
  background: var(--kreem);
  border: 1px solid var(--liiv-tume);
  border-radius: var(--raadius);
  padding: 1.6rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.kaart::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #3FC9F2, #2A3BE0 60%, #161B7E);
}
.kaart h3 { margin-bottom: .5rem; }
.kaart p { color: var(--tekst); font-size: 1rem; }

/* ---------- Galerii ---------- */
.galerii {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* Kolm veergu, sest galeriis on üheksa pilti ja nii tekib täis 3x3 ruudustik */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}
.galerii-nupp {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--valge);
  border-radius: var(--raadius);
  overflow: hidden;
  cursor: zoom-in;
  text-align: left;
  box-shadow: var(--vari);
  font: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
.galerii-nupp:hover { transform: translateY(-3px); box-shadow: var(--vari-sygav); }
.galerii-nupp img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
/* Enne ja pärast koondpilt: kärpimine lõikaks sildid ära, seega näitame tervikuna */
.galerii-nupp img.galerii-terve {
  object-fit: contain;
  background: var(--liiv);
}
.galerii-silt {
  display: block;
  padding: .8rem 1rem 1rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--tint);
}

/* ---------- Puidutööd ---------- */
.puit-ruudustik {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.puit-tekst h3 { margin-bottom: .7rem; }
.puit-pilt { margin: 0; }
.puit-pilt img {
  width: 100%;
  /* Originaal on püstine ja jätaks kõrvale suure tühja ala, seega kärbime rõhtsaks */
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 62%;
  border-radius: var(--raadius-suur);
  box-shadow: var(--vari-sygav);
}

.videod-pealkiri { margin-bottom: .8rem; }
.videod {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}
.video-kaart { margin: 0; }
/* Vertikaalne TikToki video kasvaks muidu teistest peajagu üle */
.video-vertikaalne video { max-width: 310px; }
.video-kaart video {
  width: 100%;
  border-radius: var(--raadius);
  background: var(--tint);
  box-shadow: var(--vari);
}
.video-kaart figcaption {
  margin-top: .7rem;
  font-size: .92rem;
  color: var(--tekst-hell);
}

/* ---------- Sammud ---------- */
.sammud {
  list-style: none;
  counter-reset: samm;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}
.sammud li {
  border-top: 3px solid var(--liiv-tume);
  padding-top: 1.1rem;
}
.samm-nr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--sinine);
  color: var(--valge);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  margin-bottom: .75rem;
}
.sammud h3 { margin-bottom: .35rem; }
.sammud p { font-size: 1rem; color: var(--tekst); }

.kliendid {
  margin-top: 2.5rem;
  padding: 1.4rem 1.6rem;
  background: var(--liiv);
  border-radius: var(--raadius);
  font-size: 1.05rem;
}

/* ---------- Kontakt ---------- */
.lohk-kontakt {
  background: linear-gradient(165deg, #1B2270 0%, #1E2FB8 58%, #17538C 100%);
  color: #EFF1FF;
}
.lohk-kontakt h2, .lohk-kontakt h3 { color: var(--valge); }
.lohk-kontakt .lohk-sisse { color: #DDE2FF; }
.lohk-kontakt a { color: var(--valge); text-decoration-thickness: 2px; }
.lohk-kontakt a:hover { color: #BFE9FF; }
.lohk-kontakt :focus-visible { outline-color: #9FE6FF; }

.kontakt-ruudustik {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.25rem;
}
.kontakt-plokk {
  /* Tumendav kate, mitte heledav: nii jääb hele tekst kaardil piisava kontrastiga */
  background: rgba(12, 16, 62, .3);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--raadius);
  padding: 1.5rem;
}
.kontakt-plokk h3 { margin-bottom: .2rem; }
.kontakt-roll {
  color: #DCE2FF;
  font-size: .95rem;
  margin-bottom: 1.1rem;
}
.kontakt-rida {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem .6rem;
  margin-bottom: .35rem;
  overflow-wrap: anywhere;
}
/* Telefoni ja e-posti lingid on mobiilis peamine tegevusnupp,
   seega tuleb puuteala 44 px kõrguseks tõsta. */
.kontakt-rida a {
  display: inline-block;
  padding-block: .5rem;
  min-height: 44px;
}
.kontakt-silt {
  flex: 0 0 5.5rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #C6D0FF;
  padding-top: .22rem;
}
.lohk-kontakt .nupp-esile { background: var(--valge); color: var(--sinine-tume); }
.lohk-kontakt .nupp-esile:hover { background: #E6ECFF; color: var(--sinine-tume); }
.lohk-kontakt .nupp-teine { border-color: rgba(255, 255, 255, .7); color: var(--valge); }
.lohk-kontakt .nupp-teine:hover { background: rgba(255, 255, 255, .14); color: var(--valge); }

/* ---------- Jalus ---------- */
.jalus {
  background: var(--tint);
  color: #D8D0C6;
  padding: 2.75rem 0;
  font-size: .93rem;
}
.jalus a { color: #EFE7DC; }
.jalus a:hover { color: var(--valge); }
.jalus-slogan {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.15rem;
  color: var(--kreem);
  margin-bottom: .8rem;
}
.jalus-andmed { overflow-wrap: anywhere; max-width: 70ch; }
.jalus-lingid { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; margin-top: .9rem; }
.jalus-lingid a, .jalus-andmed a {
  display: inline-block;
  padding-block: .5rem;
  min-height: 44px;
}

/* ---------- Pildi suurendus ---------- */
/* Modaaldialoog peab jääma ekraani keskele. Ära anna .suurendusele
   position: relative, see tühistab brauseri enda modaalipaigutuse ja
   dialoog satub lehe voogu, kust seda tuleb telefonis üles kerida. */
.suurendus {
  position: fixed;
  inset: 0;
  margin: auto;
  width: max-content;
  height: max-content;
  max-width: min(94vw, 1100px);
  max-height: 94vh;
  max-height: 94dvh;
  border: 0;
  padding: 0;
  background: transparent;
  overflow: visible;
}
.suurendus::backdrop { background: rgba(20, 17, 14, .86); }

.suurendus-sisu { position: relative; line-height: 0; }

.suurendus img {
  display: block;
  max-width: min(94vw, 1100px);
  max-height: 88vh;
  max-height: 88dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--raadius);
  background: var(--tint);
}
.suurendus-sulge {
  position: absolute;
  top: -.75rem;
  right: -.75rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--valge);
  color: var(--tint);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--vari-sygav);
}

/* ---------- 404 ---------- */
.viga {
  min-height: 72vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 0;
}
.viga-nr {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(4rem, 16vw, 8rem);
  font-weight: 700;
  line-height: 1;
  color: var(--sinine);
  margin: 0 0 .5rem;
}
.viga-lause { margin-inline: auto; }
.viga .nupurida { justify-content: center; }

/* =========================================================
   Murdepunktid: 1024, 768 ja 480 px
   ========================================================= */

@media (max-width: 1024px) {
  .hero-raam { grid-template-columns: minmax(0, 1fr); }
  .hero-pilt { max-width: 620px; }
  .puit-ruudustik { grid-template-columns: minmax(0, 1fr); }
  .puit-pilt { max-width: 520px; }
  .videod { grid-template-columns: minmax(0, 1fr); }
  .video-vertikaalne video { max-width: 320px; }
  .video-horisontaalne { max-width: 720px; }
}

@media (max-width: 768px) {
  html { scroll-padding-top: 78px; }
  body { font-size: 1.02rem; }

  .menuu-nupp { display: inline-flex; }

  .peamenuu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--kreem);
    border-bottom: 1px solid var(--liiv-tume);
    box-shadow: var(--vari);
    display: none;
  }
  .peamenuu.avatud { display: block; }
  .peamenuu ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .6rem 1.25rem 1.1rem;
  }
  .peamenuu a {
    display: flex;
    min-height: 52px;
    padding: 0 .75rem;
    border-radius: var(--raadius);
    font-size: 1.05rem;
  }
  .peamenuu a.menuu-esile { margin-top: .5rem; justify-content: center; }

  .pais-sisu { position: relative; min-height: 66px; }
  .pais-logo img { width: 108px; }

  .kaardid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .galerii { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nupp { flex: 1 1 100%; }
  .nupurida { gap: .65rem; }
}

@media (max-width: 480px) {
  .raam { width: calc(100% - 2rem); }
  .kaart { padding: 1.35rem 1.2rem; }
  .kontakt-plokk { padding: 1.25rem; }
  .kontakt-silt { flex-basis: 100%; }
  .kaardid { grid-template-columns: minmax(0, 1fr); }
  .galerii { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
  .galerii-nupp img { aspect-ratio: 3 / 2; }
  /* Telefonis ei mahu nupp pildist väljapoole, seega toome selle pildi peale */
  .suurendus-sulge { top: .5rem; right: .5rem; }
}

/* ---------- Vähendatud liikumine ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .nupp:hover, .galerii-nupp:hover { transform: none; }
}
