/*
Theme Name: Tyhja Pohja
Theme URI: https://example.com/
Author: Private
Description: Kevyt WordPress-teema Timi Diomedian sivuille, plugareille ja shortcode-sisällöille.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GPLv2 or later
Text Domain: tyhja-pohja
*/

:root {
  --tp-red: #a71f31;
  --tp-blue: #006f87;
  --tp-cement: #e3f3f1;
  --tp-black: #111b2f;
  --tp-bg: #f7fbfa;
  --tp-surface: #ffffff;
  --tp-text: #172033;
  --tp-muted: #667085;
  --tp-border: rgba(17, 27, 47, 0.12);
  --tp-link: var(--tp-blue);
  --tp-max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(227, 243, 241, 0.82), rgba(255, 255, 255, 0.62) 38%, rgba(167, 31, 49, 0.08)),
    var(--tp-bg);
  color: var(--tp-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--tp-link);
  text-underline-offset: 0.18em;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  width: auto;
  height: auto;
  clip: auto;
  padding: 0.75rem 1rem;
  margin: 0;
  overflow: visible;
  background: var(--tp-black);
  color: #fff;
  white-space: normal;
  z-index: 9999;
}

.tp-site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.tp-header {
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--tp-border);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  z-index: 50;
}

.tp-header-inner,
.tp-main,
.tp-footer-inner {
  width: min(var(--tp-max-width), calc(100% - 24px));
  margin: 0 auto;
}

.tp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.tp-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.tp-brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--tp-black);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.tp-brand-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.tp-site-title {
  color: var(--tp-black);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.1;
}

.tp-site-description {
  color: var(--tp-muted);
  font-size: 12px;
  line-height: 1.25;
}

.tp-menu {
  position: relative;
}

.tp-menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--tp-border);
  border-radius: 50%;
  background: var(--tp-surface);
  color: var(--tp-text);
  cursor: pointer;
  list-style: none;
  box-shadow: 0 12px 28px rgba(17, 27, 47, 0.08);
}

.tp-menu-toggle span {
  display: block;
  width: 17px;
  height: 2px;
  margin: 0 auto;
  border-radius: 99px;
  background: currentColor;
}

.tp-menu-toggle::-webkit-details-marker {
  display: none;
}

.tp-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 0.5rem;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  background: var(--tp-surface);
  box-shadow: 0 24px 60px rgba(17, 27, 47, 0.16);
  z-index: 100;
}

.tp-menu:not([open]) .tp-menu-panel {
  display: none;
}

.tp-menu-list,
.tp-menu-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tp-menu-list a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  color: var(--tp-text);
  text-decoration: none;
  font-weight: 700;
}

.tp-menu-list a:hover {
  background: var(--tp-cement);
  color: var(--tp-blue);
}

.tp-main {
  flex: 1;
  padding: clamp(28px, 6vw, 74px) 0 clamp(40px, 8vw, 96px);
}

.tp-content {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.tp-content > :first-child {
  margin-top: 0;
}

.tp-content h1,
.tp-content h2,
.tp-content h3 {
  color: var(--tp-black);
  line-height: 1.05;
  letter-spacing: 0;
}

.tp-content h1 {
  font-size: clamp(42px, 10vw, 88px);
}

.tp-content h2 {
  font-size: clamp(30px, 6vw, 54px);
}

.tp-content h3 {
  font-size: clamp(24px, 4vw, 34px);
}

.tp-content p,
.tp-content li {
  font-size: 18px;
  line-height: 1.7;
}

.tp-content .wp-block-button__link,
.tp-content button:not([class*="td-"]) {
  border-radius: 999px;
  background: var(--tp-black);
  color: #fff;
  font-weight: 800;
}

.tp-content img {
  border-radius: 8px;
}

.tp-footer {
  border-top: 1px solid var(--tp-border);
  color: var(--tp-muted);
  font-size: 13px;
}

.tp-footer-inner {
  padding: 1rem 0 1.2rem;
}

.tp-footer p {
  margin: 0;
}

@media (max-width: 700px) {
  .tp-header-inner,
  .tp-main,
  .tp-footer-inner {
    width: min(100% - 16px, var(--tp-max-width));
  }

  .tp-main {
    padding-top: 0.75rem;
  }
}
