/*
   Raadioamatöörsus - stiilileht
   Lehed: index, varustus, litsents, alusta, loeng, kontakt
*/

/* fondid laetakse HTML <link> kaudu, et vältida render-blocking @import */

/* värvid jms */
:root {
  --color-dark: #313638;
  --color-light: #e8e9eb;
  --color-blue: #254e74;
  --color-orange: #f09d51;

  --text-dark: #101213;
  --text-light: #ffffff;

  --container-max: 1100px;
  --radius: 12px;
  --radius-btn: 10px;

  --shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  --shadow-btn: 0 4px 4px rgba(0, 0, 0, 0.25);
  --shadow-btn-hover: 0 6px 6px rgba(0, 0, 0, 0.30);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-light);
  color: var(--text-dark);
  font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

.container {
  width: min(var(--container-max), 92vw);
  margin-inline: auto;
}

h1, h2, h3 {
  margin: 0 0 14px 0;
  line-height: 1.2;
  font-family: 'Raleway', system-ui, sans-serif;
}

p {
  margin: 0 0 14px 0;
}

.small {
  font-size: 0.95rem;
  opacity: 0.92;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(240, 157, 81, 0.9);
  outline-offset: 3px;
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-blue);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-light);
  font-weight: 700;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.brand span {
  font-size: 0.95rem;
  letter-spacing: 0.2px;
}

.nav-desktop {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  row-gap: 10px;
}

.nav-btn {
  display: inline-block;
  background: var(--color-orange);
  color: #000;
  padding: 12px 20px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  font-weight: 700;
  font-family: 'Raleway', system-ui, sans-serif;
  box-shadow: var(--shadow-btn);
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.nav-btn:hover {
  opacity: 0.92;
  box-shadow: var(--shadow-btn-hover);
  transform: translateY(-1px);
}

.nav-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
}

.nav-btn.is-active {
  outline: 2px solid rgba(0, 0, 0, 0.35);
  outline-offset: 2px;
}

/* mobiil */
.nav-mobile {
  position: relative;
}

.nav-mobile summary {
  list-style: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 10px;
}


.nav-mobile summary::-webkit-details-marker {
  display: none;
}

.burger {
  width: 28px;
  height: 18px;
  display: grid;
  gap: 5px;
}

.burger span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--color-orange);
  border-radius: 999px;
}

.nav-mobile-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(340px, 92vw);
  background: var(--color-blue);
  border: 1px solid rgba(240, 157, 81, 0.35);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.nav-mobile:not([open]) .nav-mobile-panel {
  display: none;
}

.nav-mobile-panel a {
  display: block;
  width: 100%;
  margin: 10px 0;
}

/* hero osa */
.hero {
  background-image:
    linear-gradient(rgba(49, 54, 56, 0.72), rgba(49, 54, 56, 0.72)),
    url('assets/hero.jpg');
  background-size: cover;
  background-position: center;
  color: var(--text-light);
  padding: 92px 0;
}

.hero-content {
  max-width: 860px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.5rem);
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .hero h1 {
    white-space: nowrap;
  }
}

.hero p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.92);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  font-weight: 700;
  font-family: 'Raleway', system-ui, sans-serif;
  border: 2px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.btn-primary {
  background: var(--color-orange);
  color: #000;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  box-shadow: var(--shadow-btn-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text-dark);
  border-color: var(--color-blue);
}

.btn-secondary:hover {
  border-color: var(--color-orange);
  background: var(--color-blue);
  color: var(--text-light);
}

.hero .btn-secondary {
  color: var(--text-light);
  border-color: rgba(255, 255, 255, 0.75);
}

.hero .btn-secondary:hover {
  border-color: var(--color-orange);
  background: transparent;
  color: var(--text-light);
}

/* sektsioonid */
.section {
  padding: 64px 0;
}

.section-light {
  background: #ffffff;
}

.section-muted {
  background: var(--color-light);
  color: var(--text-dark);
}

.section-dark {
  background: var(--color-dark);
  color: var(--text-light);
}


.note {
  background: rgba(240, 157, 81, 0.14);
  border: 1px solid rgba(240, 157, 81, 0.32);
  border-left: 6px solid rgba(240, 157, 81, 0.85);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 14px 0;
}

.section-dark .note {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.14);
}

.two-col {
  display: flex;
  gap: 22px;
  align-items: start;
  margin-top: 18px;
}

.two-col > * {
  flex: 1;
}

.figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
}

.figure figcaption {
  padding: 10px 12px;
  font-size: 0.92rem;
  opacity: 0.9;
}


.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 14px 0;
}

.checklist li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-blue);
  font-weight: 900;
}

.section-dark .checklist li::before {
  color: var(--color-orange);
}

.steps {
  padding-left: 18px;
  margin: 0 0 14px 0;
}

.steps li {
  margin-bottom: 10px;
}

.info-cards {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.card {
  flex: 1 1 220px;
  border-radius: var(--radius);
  background: var(--color-light);
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.card h3 {
  margin-bottom: 8px;
  color: var(--color-blue);
}

.external-link {
  color: var(--color-blue);
  font-weight: 700;
}

.external-link:hover {
  text-decoration: underline;
}

.code-block {
  background: #101213;
  color: #e8e9eb;
  padding: 14px 16px;
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(240, 157, 81, 0.18);
  white-space: pre-wrap;
}

/* galerii */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.gallery-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.gallery-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-card .gallery-body {
  padding: 14px;
}

.gallery-card h3 {
  margin: 0 0 8px 0;
  color: var(--color-blue);
  font-size: 1.1rem;
}

.gallery-card p {
  margin: 0;
  font-size: 0.96rem;
}

.stack {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.split {
  display: flex;
  gap: 18px;
  align-items: stretch;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10);
}

.split-text {
  padding: 16px;
  flex: 1.2;
}

.split img {
  width: 42%;
  object-fit: cover;
  flex: 0.8;
}

/* tabelid */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  margin-top: 14px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10);
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: left;
}

.table th {
  background: var(--color-light);
  font-family: 'Raleway', system-ui, sans-serif;
}

.table tbody tr:hover {
  background: rgba(240, 157, 81, 0.14);
}

/* video */
.video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
  margin-top: 18px;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* kontakt */
.contact-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.contact-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 16px;
}

.contact-box a {
  color: var(--color-orange);
  font-weight: 700;
  text-decoration: none;
}

.contact-box a:hover {
  text-decoration: underline;
}

.contact-form {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 16px;
}

label {
  display: block;
  font-weight: 700;
  margin-top: 12px;
  margin-bottom: 6px;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-light);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

button.btn-primary {
  border: 0;
  cursor: pointer;
}

footer {
  background: #222629;
  color: rgba(255, 255, 255, 0.85);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

footer a {
  color: var(--color-orange);
  text-decoration: none;
  font-weight: 700;
}

footer a:hover {
  text-decoration: underline;
}

/* responsive */
@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }

  .nav-mobile {
    display: none;
  }
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .split img {
    width: 38%;
  }

  .table {
    min-width: 460px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 72px 0;
  }

  .two-col {
    flex-direction: column;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .split {
    flex-direction: column;
  }

  .split img {
    width: 100%;
  }

  .section {
    padding: 48px 0;
  }

  .nav-mobile-panel .nav-btn {
    padding: 12px 16px;
  }

  .table {
    min-width: 420px;
  }
}
