/* 1. Oma WOFF2-font. Fail on samas kaustas */
@font-face {
  font-family: "KooliFont";
  src: url("opensans.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

/* 2. CSS-i muutujad: värvi muutmiseks muuda ainult siin */
:root {
  --brand: #c2500a;
  --brand-light: #fff3e8;
  --text: #222831;
  --space: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "KooliFont", Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
}

header {
  background: var(--brand-light);
  border-bottom: 4px solid var(--brand);
  padding: var(--space);
  text-align: center;
}

h1, h2 { color: var(--brand); line-height: 1.25; }
h1 { margin-top: 0; font-weight: 800; }

/* 3. Flexbox: display: flex käib vanemale (nav), lingid on selle lapsed */
nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

nav a {
  padding: 8px 16px;
  border: 2px solid var(--brand);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

a { color: var(--brand); }
nav a:hover, nav a[aria-current="page"] { background: var(--brand); color: white; }

main {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space);
}

section { margin-bottom: calc(var(--space) * 2); }

img { max-width: 100%; height: auto; border-radius: 12px; }

button, input {
  font: inherit;
  padding: 10px 16px;
  border: 2px solid var(--brand);
  border-radius: 8px;
}

button { background: var(--brand); color: white; cursor: pointer; }
input { display: block; width: 100%; max-width: 400px; }

footer {
  background: var(--brand);
  color: white;
  text-align: center;
  padding: var(--space);
}

/* 4. Lisakujundus: kaardid ja varjud */
body { background: #fff8f2; }
header { background: white; }
img { display: block; width: 100%; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); margin-bottom: var(--space); }
section {
  background: white;
  padding: var(--space);
  margin-bottom: var(--space);
  border-radius: 12px;
  border-left: 6px solid var(--brand);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
section h2 { margin-top: 0; }

/* Foto ja autori nimi */
figure { margin: 0 0 var(--space); }
figure img { margin-bottom: 4px; }
figcaption { font-size: 0.85rem; text-align: right; }
