/* Märkmed — isikliku blogi veeb
   Kujundus: hele, õhuline, serif-pealkirjad, üks sinine aktsent.
   Ükski font-size ei ole väiksem kui 12px. */

/* --- Fondid ------------------------------------------------------------ */

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/newsreader-latin.woff2') format('woff2');
  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: 'Newsreader';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/newsreader-latin-ext.woff2') format('woff2');
  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: 'Newsreader';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/newsreader-italic-latin.woff2') format('woff2');
  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: 'Newsreader';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/newsreader-italic-latin-ext.woff2') format('woff2');
  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: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  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: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  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;
}

/* --- Muutujad ---------------------------------------------------------- */

:root {
  --white: #fff;
  --ink: #161719;
  --muted: #646970;
  --line: #dfe3e7;
  --soft: #f6f8fa;
  --blue-soft: #eaf3fa;
  --blue: #2f648f;
  --blue-dark: #234e72;
  --body: #4e5359;

  --tint-sinine: #e8f1f8;
  --tint-roheline: #ebf1ea;
  --tint-liiv: #f4f0e8;

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --wide: 1380px;
  --mid: 1240px;
  --header-h: 76px;
}

/* --- Alus -------------------------------------------------------------- */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #9dc7e8;
  outline-offset: 3px;
}

[hidden] { display: none !important; }

img { max-width: 100%; }

.skip-link {
  position: absolute;
  z-index: 200;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

.wrap { width: min(var(--wide), calc(100% - 64px)); margin-inline: auto; }
.wrap-mid { width: min(var(--mid), calc(100% - 64px)); margin-inline: auto; }

.label {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* --- Päis -------------------------------------------------------------- */

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(1.4) blur(6px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(var(--wide), calc(100% - 64px));
  min-height: var(--header-h);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.logo, .footer-logo {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.site-nav { display: flex; align-items: center; gap: 28px; }

.site-nav a, .menu-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  text-decoration: none;
}
.site-nav a:not(.header-cta):hover,
.site-nav a[aria-current='page'] { color: var(--blue); }

.site-nav .header-cta {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.site-nav .header-cta:hover { background: var(--blue-dark); color: #fff; }

.menu-toggle { display: none; }

/* --- Sissejuhatus ------------------------------------------------------ */

.blog-intro {
  width: min(var(--wide), calc(100% - 64px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: end;
  gap: 34px;
  padding: 48px 0 36px;
}

.blog-intro h1 {
  max-width: 860px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(31px, 3.5vw, 46px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

/* --- Esiletõstetud postitus -------------------------------------------- */

.featured-post {
  width: min(var(--wide), calc(100% - 64px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  align-items: center;
  gap: clamp(40px, 5.5vw, 72px);
  padding: 36px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.featured-image {
  height: 500px;
  display: block;
  overflow: hidden;
  background: var(--soft);
}
.featured-image img,
.article-row .cover img,
.post-image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.featured-image img { transition: transform 350ms ease; }
.featured-image:hover img { transform: scale(1.015); }

.post-meta, .row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.post-meta a, .row-meta a { color: inherit; text-decoration: none; }
.post-meta > :first-child, .row-meta > :first-child { color: var(--blue); }
.post-meta a:hover { color: var(--blue); text-decoration: underline; }

.featured-content h2 {
  margin: 20px 0;
  font-family: var(--serif);
  font-size: clamp(40px, 4.4vw, 56px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.04;
}
.featured-content h2 a { color: inherit; text-decoration: none; }
.featured-content h2 a:hover { color: var(--blue-dark); }
.featured-content > p:not(.post-meta) {
  margin: 0;
  color: var(--body);
  font-size: 17px;
  line-height: 1.7;
}

.text-link, .back-button {
  display: inline-block;
  padding: 0 0 4px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.text-link { margin-top: 30px; }
.text-link:hover, .back-button:hover { color: var(--blue); }

/* --- Tüpograafiline kaas ----------------------------------------------- */

.cover-type {
  display: grid;
  align-content: space-between;
  padding: clamp(20px, 3vw, 38px);
  background: var(--tint-sinine);
  color: var(--ink);
}
.cover-type[data-tint='roheline'] { background: var(--tint-roheline); }
.cover-type[data-tint='liiv'] { background: var(--tint-liiv); }

.cover-type .cover-mark {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
/* display: block on vajalik — need on span-id ja reasisese elemendi laius
   ja kõrgus jäetaks muidu arvestamata (joon oli 0 px lai). */
.cover-type .cover-title {
  display: block;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(19px, 2.1vw, 30px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.18;
}
.cover-type .cover-rule {
  width: 44px;
  height: 1px;
  display: block;
  margin-top: 14px;
  background: var(--blue);
  opacity: 0.5;
}

.featured-image.cover-type .cover-title { font-size: clamp(28px, 3.4vw, 42px); }

/* Reavaates on kaas 320x192 ja pealkirjad on eri pikkusega. Väiksem kiri,
   väiksem sisemine ruum ja kindluse mõttes neli rida — muidu lõigatakse pikem
   pealkiri kaane servast pooleli. */
.article-row .cover-type { padding: 20px; }
.article-row .cover-type .cover-title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.22;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.article-row .cover-type .cover-rule { margin-top: 10px; }

/* --- Postituste loend --------------------------------------------------- */

.articles {
  width: min(var(--mid), calc(100% - 64px));
  margin: 96px auto 110px;
}
.articles-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 50px;
}
.articles-head h2, .about h2, .newsletter h2, .page-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.articles-head h2 { font-size: clamp(36px, 4vw, 48px); }

.search-wrap { width: 270px; }
.search-wrap label, .form-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.search-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #cfd5da;
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}

.category-tabs {
  display: flex;
  gap: 28px;
  margin-top: 30px;
  border-bottom: 1px solid var(--line);
}
.category-tabs a, .category-tabs button {
  position: relative;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
}
.category-tabs a:after, .category-tabs button:after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
  content: '';
}
.category-tabs a:hover, .category-tabs button:hover,
.category-tabs .active { color: var(--ink); }
.category-tabs .active:after { background: var(--blue); }

.article-list { border-bottom: 1px solid var(--line); }

.article-row {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 38px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.article-row:last-child { border-bottom: 0; }
.article-row .cover {
  height: 192px;
  overflow: hidden;
  background: var(--soft);
}
.article-row .cover img { transition: opacity 160ms ease; }
.article-row:hover .cover img { opacity: 0.88; }
.article-row h3 {
  margin: 12px 0 10px;
  font-family: var(--serif);
  font-size: clamp(27px, 3vw, 34px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.article-row:hover h3 { color: var(--blue-dark); }
.row-excerpt {
  max-width: 760px;
  margin: 0 0 14px;
  color: #555b61;
  font-size: 15px;
  line-height: 1.65;
}
.row-time { margin: 0; color: var(--muted); font-size: 12px; }
.empty { margin: 0; padding: 44px 0; color: var(--muted); }

.list-more { margin-top: 32px; text-align: center; }
.more-button {
  min-height: 46px;
  padding: 0 26px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}
.more-button:hover { background: var(--ink); color: #fff; }

/* --- Minust ------------------------------------------------------------ */

.about {
  width: min(var(--mid), calc(100% - 64px));
  margin: 0 auto 110px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 48px;
  padding: 62px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
/* `/minust/` lehel ei ole silditulpa ega ülemist joont — pealkiri on juba lehe päises.
   Laius on sama, mis lehe päisel, et vasak äär oleks kogu lehel üks. */
.about-plain {
  width: min(var(--mid), calc(100% - 64px));
  grid-template-columns: minmax(0, 1fr);
  padding-top: 0;
  border-top: 0;
}
.about-plain .about-main {
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(36px, 5vw, 60px);
}

.about-main {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(340px, 1fr);
  align-items: center;
  gap: clamp(46px, 6vw, 78px);
}
/* height: auto on kohustuslik — img width/height atribuudid on presentatsioonivihjed
   ja määratud kõrgus tühistaks aspect-ratio. */
.about-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  display: block;
  object-fit: cover;
}
.about-content { max-width: 640px; }
.about h2 { font-size: clamp(36px, 4vw, 48px); }
.about-text { margin-top: 26px; }
.about-text p { margin: 0 0 17px; color: #4f555b; font-size: 16px; line-height: 1.75; }
.about-text a {
  display: inline-block;
  margin-top: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.about-text a:hover { color: var(--blue); }

/* --- Uudiskiri ---------------------------------------------------------- */

.newsletter {
  width: min(var(--wide), calc(100% - 64px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  align-items: center;
  gap: clamp(50px, 8vw, 110px);
  padding: clamp(44px, 5vw, 64px);
  background: var(--blue-soft);
}
.newsletter .label { margin-bottom: 13px; }
.newsletter h2 { font-size: clamp(34px, 3.8vw, 46px); }
.newsletter > div > p:last-child { margin: 13px 0 0; color: #52616d; font-size: 15px; }
.newsletter form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.newsletter input, .newsletter form button { min-height: 50px; border-radius: 0; }
.newsletter input {
  min-width: 0;
  padding: 0 15px;
  border: 1px solid #9fb4c4;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
}
.newsletter form button {
  padding: 0 24px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}
.newsletter form button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
/* #687680 andis helesinisel taustal kontrastiks 4.16 — WCAG AA nõuab 4.5. */
.newsletter form > p { margin: 9px 0 0; color: #566068; font-size: 12px; }

.notice {
  margin: 0;
  padding: 20px 22px;
  border-left: 3px solid var(--blue);
  background: #fff;
  color: #47535d;
  font-size: 15px;
}

/* --- Jalus -------------------------------------------------------------- */

.site-footer { width: min(var(--wide), calc(100% - 64px)); margin: 72px auto 0; }
.footer-top, .footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.footer-top { padding-bottom: 42px; }
.footer-tagline { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.footer-top > a { color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.footer-top > a:hover { color: var(--blue); }
.footer-bottom {
  min-height: 66px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.footer-bottom > div { display: flex; gap: 24px; }
.footer-bottom a {
  border-bottom: 1px solid transparent;
  color: inherit;
  font-size: 12px;
  text-decoration: none;
}
.footer-bottom a:hover { border-bottom-color: currentColor; color: var(--ink); }

/* --- Postituse leht ------------------------------------------------------ */

.reading-progress {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
}
.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--blue);
  transform-origin: left;
}

.post-view { width: min(var(--wide), calc(100% - 64px)); margin: 0 auto; }
.back-button { margin: 42px 0 0; }
.post-header { width: min(1000px, 100%); margin: 68px auto 52px; }
.post-header .post-meta { margin-bottom: 22px; }
.post-header h1 {
  max-width: 980px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 5.2vw, 60px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.04;
}
.post-lead {
  max-width: 780px;
  margin: 27px 0 0;
  color: #4c5359;
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.65;
}
.post-image-wrap {
  width: min(1200px, 100%);
  height: clamp(360px, 48vw, 560px);
  margin: 0 auto;
  background: var(--soft);
}
.post-image-wrap.cover-type { align-content: center; justify-items: center; text-align: center; }
.post-image-wrap.cover-type .cover-title {
  max-width: 700px;
  font-size: clamp(30px, 4vw, 46px);
}
.post-image-wrap.cover-type .cover-rule { margin: 20px auto 0; }

.post-body {
  width: min(800px, 100%);
  margin: 68px auto 0;
  color: #303438;
  font-family: var(--serif);
  font-size: clamp(18px, 1.55vw, 20px);
  line-height: 1.85;
}
.post-body p { margin: 0 0 30px; }
.post-body blockquote {
  margin: 58px 0;
  padding-left: 28px;
  border-left: 3px solid #8fb7d5;
  color: var(--blue-dark);
  font-size: clamp(27px, 3vw, 36px);
  font-style: italic;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.author-box {
  width: min(800px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 26px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.author-box img { width: 88px; height: 88px; display: block; object-fit: cover; }
.author-box p { margin: 0; color: var(--body); font-size: 15px; line-height: 1.65; }
.author-box strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 16px; }

.related { width: min(800px, 100%); margin: 62px auto 0; }
.related .label { margin-bottom: 20px; }
.related ul { margin: 0; padding: 0; list-style: none; }
.related li { border-bottom: 1px solid var(--line); }
.related li:first-child { border-top: 1px solid var(--line); }
.related a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  color: var(--ink);
  text-decoration: none;
}
.related a span:first-child {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.2;
}
.related a span:last-child { color: var(--muted); font-size: 12px; font-weight: 700; }
.related a:hover span:first-child { color: var(--blue-dark); }

.next-post {
  width: min(800px, 100%);
  margin: 62px auto 110px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.next-post > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 14px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.next-post > a span:first-child {
  font-family: var(--serif);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.15;
}
.next-post > a span:last-child { color: var(--blue); font-size: 12px; font-weight: 700; }
.next-post > a:hover span:first-child { color: var(--blue-dark); }

/* --- Sisulehed ----------------------------------------------------------- */

/* Kõik sisulehe plokid jagavad sama vasakut äärt. Loetavat reapikkust hoiab
   max-width tekstil endal, mitte kitsam konteiner. */
.page-head {
  width: min(var(--mid), calc(100% - 64px));
  margin: 0 auto;
  padding: 68px 0 40px;
}
.page-head h1 { font-size: clamp(38px, 4.6vw, 54px); }
.page-head .label { margin-bottom: 18px; }
.page-head > p {
  max-width: 720px;
  margin: 24px 0 0;
  color: #4c5359;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.65;
}

.prose {
  width: min(var(--mid), calc(100% - 64px));
  margin: 0 auto 110px;
  color: #3c4247;
  font-size: 16px;
  line-height: 1.8;
}
.prose p, .prose ul { max-width: 68ch; }
.prose h2 {
  margin: 46px 0 14px;
  font-family: var(--serif);
  font-size: clamp(25px, 2.6vw, 31px);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 18px; }
.prose ul { margin: 0 0 18px; padding-left: 20px; }
.prose li { margin-bottom: 9px; }
.prose li::marker { color: #8fb7d5; }
.prose a { color: var(--blue); }

/* --- Kontaktivorm --------------------------------------------------------- */

.contact-grid {
  width: min(var(--mid), calc(100% - 64px));
  margin: 0 auto 110px;
  padding-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
  align-items: start;
  gap: clamp(44px, 6vw, 90px);
}
.contact-form { display: grid; gap: 22px; }
.form-field input, .form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfd5da;
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
}
.form-field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.contact-form button {
  justify-self: start;
  min-height: 50px;
  padding: 0 28px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}
.contact-form button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.form-note { margin: 0; color: var(--muted); font-size: 12px; }
.contact-aside { padding: 30px; background: var(--soft); }
.contact-aside p { margin: 0 0 14px; color: var(--body); font-size: 15px; line-height: 1.7; }
.contact-aside p:last-child { margin-bottom: 0; }
.contact-aside a { color: var(--blue); }

/* --- 404 ------------------------------------------------------------------ */

.error-page {
  width: min(720px, calc(100% - 64px));
  margin: 0 auto;
  padding: clamp(80px, 12vw, 150px) 0;
  text-align: center;
}
.error-page h1 {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 54px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.08;
}
.error-page p { margin: 22px 0 0; color: var(--body); font-size: 17px; line-height: 1.7; }
.error-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 34px; }
/* .more-button on kirjutatud <button>-ile; <a>-na vajab ta ise display'd.
   .text-link'i vaikimisi margin-top lükkaks ta nupu alt välja. */
.error-actions .more-button { display: inline-flex; align-items: center; text-decoration: none; }
.error-actions .text-link { margin-top: 0; align-self: center; }

/* --- 900px ---------------------------------------------------------------- */

@media (max-width: 900px) {
  .header-inner { position: relative; }
  .menu-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 16px 34px rgba(18, 25, 30, 0.08);
  }
  .site-nav.open { display: flex; flex-direction: column; }
  .site-nav .header-cta { width: 100%; justify-content: center; }
  .blog-intro { grid-template-columns: 120px 1fr; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-image { height: 430px; }
  .featured-content { max-width: 680px; padding-bottom: 12px; }
  .about { grid-template-columns: 1fr; gap: 20px; }
  .about-main,
  .about-plain .about-main { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 40px; }
  .newsletter { grid-template-columns: 1fr; align-items: start; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* --- 620px ---------------------------------------------------------------- */

@media (max-width: 620px) {
  :root { --header-h: 68px; }

  .header-inner, .blog-intro, .featured-post, .newsletter, .site-footer, .post-view,
  .page-head, .prose, .articles, .about, .contact-grid, .error-page {
    width: min(calc(100% - 32px), var(--wide));
  }
  .header-inner { min-height: var(--header-h); }
  .blog-intro { grid-template-columns: 1fr; gap: 13px; padding: 38px 0 28px; }
  .blog-intro h1 { font-size: 32px; }
  .featured-post { gap: 28px; padding: 24px 0 32px; }
  .featured-image { height: 260px; }
  .featured-content h2 { margin-top: 16px; font-size: 34px; }
  .articles { margin-top: 72px; margin-bottom: 82px; }
  .articles-head { align-items: stretch; flex-direction: column; gap: 24px; }
  .search-wrap { width: 100%; }
  .category-tabs { gap: 22px; overflow-x: auto; }
  .category-tabs a, .category-tabs button { flex: 0 0 auto; }
  .article-row { grid-template-columns: 112px minmax(0, 1fr); gap: 18px; padding: 22px 0; }
  .article-row .cover { height: 118px; }
  .article-row h3 { margin-top: 8px; font-size: 22px; }
  .row-excerpt { display: none; }
  .row-time { display: inline-block; margin-top: 9px; }
  .cover-type { padding: 12px; }
  .article-row .cover-type .cover-mark { display: none; }
  .article-row .cover-type .cover-title { font-size: 14px; line-height: 1.25; }
  .article-row .cover-type .cover-rule { display: none; }
  .about { gap: 14px; margin-bottom: 82px; padding: 46px 0; }
  .about-main,
  .about-plain .about-main { grid-template-columns: 1fr; gap: 26px; }
  .about-photo { max-height: 520px; object-position: center 28%; }
  .newsletter { gap: 34px; padding: 38px 24px; }
  .newsletter form > div { grid-template-columns: 1fr; }
  .newsletter form button { margin-top: -1px; }
  .site-footer { margin-top: 54px; }
  .footer-top, .footer-bottom { align-items: flex-start; flex-direction: column; }
  .footer-top { padding-bottom: 30px; }
  .footer-bottom { gap: 13px; padding: 22px 0; }
  .back-button { margin-top: 32px; }
  .post-header { margin: 48px auto 38px; }
  .post-header h1 { font-size: 40px; }
  .post-image-wrap { height: 280px; }
  .post-body { margin-top: 50px; font-size: 18px; line-height: 1.78; }
  .post-body blockquote { margin: 46px 0; padding-left: 20px; font-size: 26px; }
  .author-box { grid-template-columns: 64px minmax(0, 1fr); gap: 18px; }
  .author-box img { width: 64px; height: 64px; }
  .next-post { margin-bottom: 80px; }
  .next-post > a, .related a { align-items: flex-start; flex-direction: column; gap: 10px; }
  .page-head { padding: 46px 0 30px; }
  .contact-aside { padding: 24px; }
}

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