/* =========================================================
   Wild Wild Works – main.css
   Vaalea perusta + hallittu draama
   ========================================================= */

/* ---------- Brand variables ---------- */
:root{
  /* Perus */
  --bg:#F4F6F8;
  --panel:#FFFFFF;
  --panel2:#EEF2F6;

  --text:#1E242B;
  --muted:#5F6B7A;

  --line:#D8DEE6;

  --accent:#4A6FA5;
  --accent-hover:#3F5F8E;

  /* Tumma ankkuri */
  --dark:#0E1A2A;
  --dark-text:#E9EEF4;
  --dark-line:#24364D;

  --radius:16px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
}

/* ---------- Reset / base ---------- */
*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: var(--bg);
  color:var(--text);
  line-height:1.6;
}

a{color:inherit}
a:hover{opacity:.9}

.wrap{min-height:100%}
.container{max-width:1100px; margin:0 auto; padding:0 20px}

/* ---------- Header / nav ---------- */
.site-header{
  position:sticky; top:0; z-index:20;
  background: rgba(244,246,248,.85);
  backdrop-filter: blur(8px);
  border-bottom:1px solid var(--line);
}

.header-inner{
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px 0;
}

/* Brand */
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
}

/* Logo image (if used) */
.brand-logo{
  width:44px;
  height:44px;
  display:block;
}


/* Brand name typography */
.brand-name{
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  letter-spacing: -0.01em;
  font-size:21px;   /* mobile */
  line-height:1.05;
}

@media (min-width: 920px){
  .brand-name{
    font-size:24px; /* desktop */
  }
}


/* "Works" in the logo only = machine accent */
.brand-name .works{
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight:600;
  letter-spacing:0.04em;
  text-transform:uppercase;
  font-size:0.95em; /* optical balance vs serif */
}

/* Nav */
.nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-left:auto;
}

.nav-link{
  text-decoration:none;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid transparent;

  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:15px;
  font-weight:500;
  letter-spacing:0.04em;

  color:var(--muted);
}


.nav-link.is-active{
  color:var(--text);
  border-color: var(--line);
  background: var(--panel2);
}

.header-cta{display:none}
@media (min-width: 920px){
  .header-cta{display:block}
}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 16px;
  border-radius:14px;
  text-decoration:none;
  border:1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.btn-primary{
  background: var(--accent);
  color:#fff;
  border-color: transparent;
  box-shadow: var(--shadow);
}

.btn-primary:hover{ background: var(--accent-hover); }

.btn-ghost{
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost:hover{ background: var(--panel2); }

button.btn{cursor:pointer}

/* ---------- Hero (dark anchor) ---------- */
.hero{
  background:
    linear-gradient(180deg, rgba(14,26,42,.95), rgba(14,26,42,.85)),
    radial-gradient(900px 400px at 20% 0%, rgba(74,111,165,.25), transparent 60%);
  color: var(--dark-text);
  padding:72px 0 48px;
}

.eyebrow{
  margin:0 0 10px;
  color: var(--muted);
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size:12px;
}

.hero .eyebrow{ color: rgba(233,238,244,.7); }

h1{
  margin:0 0 14px;
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 54px);
  line-height:1.05;
  letter-spacing:-.02em;
  font-weight:700;
  max-width: 18ch;
}

@media (max-width: 600px){
  h1{
    font-size: 32px;      /* nyt se on liian lähellä desktopia */
    line-height: 1.1;
    max-width: 14ch;      /* tiivistää, tekee siitä julistuksen */
  }
}


h2,h3{
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  letter-spacing:-0.01em;
}

.lead{
  margin:0 0 18px;
  max-width:72ch;
  font-size:18px;
}

.hero .lead,
.hero .muted{ color: rgba(233,238,244,.9); }

.actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:14px;
}

.hero-note{
  margin-top:18px;
  display:flex;
  align-items:center;
  gap:10px;
  color: rgba(233,238,244,.75);
  font-size:14px;
}

.dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(74,111,165,.18);
}

/* ---------- Page hero ---------- */
.page-hero{ padding:52px 0 22px; }

/* ---------- Sections ---------- */
.section{ padding:34px 0; }

.section-alt{
  background: var(--panel2);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

.section.cta{
  background: linear-gradient(180deg, rgba(14,26,42,.96), rgba(14,26,42,.9));
  color: var(--dark-text);
}

.section.cta .muted{ color: rgba(233,238,244,.85); }

.section-head{ margin-bottom:18px; }

.section h2{
  margin:0 0 10px;
  font-size:24px;
}

.section h3{
  margin:0 0 10px;
  font-size:18px;
}

.muted{ color:var(--muted); }

/* ---------- Layout helpers ---------- */
.grid-2{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}

@media (min-width:900px){
  .grid-2{ grid-template-columns:1.15fr .85fr; }
}

.cards-4{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}

@media (min-width:820px){
  .cards-4{ grid-template-columns:1fr 1fr; }
}

@media (min-width:1080px){
  .cards-4{ grid-template-columns:repeat(4,1fr); }
}

.stack{ display:grid; gap:14px; }

/* ---------- Cards ---------- */
.card{
  background: var(--panel);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:20px;
  box-shadow: var(--shadow);
}

.card-link{
  display:block;
  text-decoration:none;
  color:inherit;
}

.card-link .link{
  color: var(--accent);
  font-weight:600;
}

/* ---------- Lists ---------- */
.checklist,
.steps{
  margin:12px 0 0;
  padding:0 0 0 18px;
}

.checklist li,
.steps li{ margin:8px 0; }

/* ---------- Prose ---------- */
.prose{ max-width:78ch; }
.prose p{ margin:0 0 12px; }
.prose h2{ margin-top:14px; }

hr.sep{
  border:0;
  height:1px;
  background: var(--line);
  margin:16px 0;
}

/* ---------- Footer ---------- */
.site-footer{
  margin-top:26px;
  border-top:1px solid var(--line);
  background: var(--panel2);
}

.footer-inner{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:22px 0;
}

@media (min-width:900px){
  .footer-inner{
    flex-direction:row;
    justify-content:space-between;
    align-items:center;
  }
}

.footer-title{ font-weight:800; }
.footer-tagline{ color:var(--muted); margin-top:4px; }

.footer-meta a{
  color:var(--text);
  text-decoration:none;
}
.footer-meta a:hover{ text-decoration:underline; }

.footer-bottom{
  padding:12px 0 18px;
  color:var(--muted);
  font-size:13px;
}

/* ---------- Forms / alerts ---------- */
.form{ display:grid; gap:12px; }

.field label{
  display:block;
  font-weight:600;
  margin:0 0 6px;
}

.field input,
.field textarea{
  width:100%;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  outline:none;
}

.field input:focus,
.field textarea:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 6px rgba(74,111,165,.12);
}

.field-error{
  margin-top:8px;
  color:#B54444;
  font-size:13px;
}

.alert{
  border-radius:14px;
  padding:12px 14px;
  border:1px solid var(--line);
  margin:10px 0 14px;
}

.alert-ok{
  background:#E9F6EF;
  border-color:#B9E2CC;
}

.alert-bad{
  background:#FCECEC;
  border-color:#F0BABA;
}

.hp-field{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  overflow:hidden;
}

/* ---------- Mobile nav (hamburger) ---------- */
/* (CSS safe even if you haven't added the button yet) */
.nav-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  margin-left:auto;
}

.nav-toggle-bars{
  width:18px;
  height:2px;
  background: currentColor;
  position: relative;
  border-radius:2px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after{
  content:"";
  position:absolute;
  left:0;
  width:18px;
  height:2px;
  background: currentColor;
  border-radius:2px;
}

.nav-toggle-bars::before{ top:-6px; }
.nav-toggle-bars::after{ top:6px; }

/* Desktop: show normal nav, hide hamburger */
@media (min-width: 920px){
  .nav-toggle{ display:none; }
}

/* Mobile: nav collapses */
@media (max-width: 919px){
  .nav{
    display:none;
    width:100%;
    margin:12px 0 0;
    padding:10px;
    border:1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
  }
  .nav.is-open{ display:flex; }
  .nav{ flex-direction:column; gap:8px; }
  .nav-link{ padding:10px 12px; }
  .header-inner{ flex-wrap:wrap; }
}

@media (max-width: 600px){
  .container{
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 600px){
  .hero .lead{
    font-size: 16px;
    max-width: 30ch;
  }
}

@media (max-width: 600px){
  .hero .actions{
    margin-top: 20px;
    gap: 14px;
  }
}

.hero.hero--compact{
  padding:56px 0 36px;
}
