:root {
  --ink: #111111;
  --muted: #6c6a66;
  --line: #ded9d2;
  --surface: #ffffff;
  --band: #f4f1ec;
  --accent: #ff7a00;
  --accent-dark: #d95f00;
  --warm: #ffb000;
  --charcoal: #2a2a2d;
  --shadow: 0 18px 50px rgba(17, 17, 17, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: "Avenir Next", "Nunito Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.is-locked {
  overflow: hidden;
}

a {
  color: inherit;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(17, 17, 17, 0.74), rgba(17, 17, 17, 0.72)),
    url("assets/logo-groter.png") center / cover;
}

.login-panel {
  width: min(100%, 480px);
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.login-logo {
  display: block;
  width: 128px;
  height: 80px;
  object-fit: cover;
  object-position: 50% 42%;
  margin-bottom: 18px;
  border: 3px solid var(--ink);
  border-radius: 8px;
}

.login-panel h1,
.hero h1,
.section-heading h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

.login-panel h1 {
  font-size: clamp(2rem, 7vw, 3.2rem);
}

.login-copy {
  color: var(--muted);
}

.login-panel label {
  display: block;
  margin: 24px 0 8px;
  font-weight: 700;
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  min-width: 0;
  padding: 14px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffaf4;
  font: inherit;
}

button,
.primary-button,
.secondary-button,
.resource-card a,
.tool-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.primary-button:hover,
.resource-card a:hover,
.tool-card a:hover {
  background: var(--accent-dark);
  color: #fff;
}

.secondary-button,
.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.secondary-button:hover,
.ghost-button:hover {
  background: var(--band);
}

.login-error {
  min-height: 24px;
  margin: 14px 0 0;
  color: #a52a25;
  font-weight: 700;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 14px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  width: 54px;
  height: 42px;
  object-fit: cover;
  object-position: 50% 42%;
  border-radius: 8px;
  border: 2px solid var(--ink);
  background: var(--band);
}

.brand small {
  display: block;
  color: var(--muted);
}

nav {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

nav a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 750;
  text-decoration: none;
}

nav a:hover {
  background: var(--band);
  color: var(--ink);
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  align-items: stretch;
  background:
    radial-gradient(circle at 86% 20%, rgba(255, 122, 0, 0.14), transparent 24%),
    linear-gradient(135deg, #111 0%, #242426 100%);
  color: #fff;
}

.hero-media {
  display: grid;
  min-height: 360px;
  place-items: end center;
  overflow: hidden;
  background: #ece8df;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  opacity: 1;
}

.hero-content {
  display: grid;
  align-content: center;
  max-width: 760px;
  padding: clamp(42px, 7vw, 96px);
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(3rem, 8vw, 6.8rem);
  font-weight: 950;
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  color: #f1eee8;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--warm);
}

.section {
  padding: clamp(44px, 8vw, 96px) clamp(18px, 4vw, 48px);
}

.band {
  background: var(--band);
}

.section-heading {
  max-width: 1100px;
  margin: 0 auto 24px;
}

.section-heading h2 {
  font-size: clamp(2rem, 5vw, 4.4rem);
  font-weight: 950;
}

.section-intro {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.tool-grid,
.tool-controls,
.resource-list,
.media-layout {
  max-width: 1100px;
  margin: 0 auto;
}

.tool-controls {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.tool-controls input {
  width: 100%;
  border: 2px solid var(--ink);
  background: #fff;
  font-weight: 750;
}

.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.category-tab {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
}

.category-tab[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tool-card,
.resource-card {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 226px;
  padding: 18px;
  border: 2px solid rgba(17, 17, 17, 0.1);
  border-radius: 8px;
  background: #fff;
}

.tool-card {
  border-top: 7px solid var(--accent);
}

.tool-card h3,
.resource-card h3,
.media-layout h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.15;
}

.tool-card p,
.resource-card p {
  margin: 0;
  color: var(--muted);
}

.tool-card a,
.resource-card a {
  align-self: end;
  justify-self: start;
  margin-top: auto;
}

.tool-category {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff0df;
  color: #8c3f00;
  font-size: 0.78rem;
  font-weight: 900;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-weight: 800;
}

.resource-list {
  display: grid;
  gap: 12px;
}

.resource-card {
  min-height: 0;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.resource-card h3,
.resource-card p {
  grid-column: 2;
}

.resource-card a {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.resource-meta {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 8px;
  background: var(--band);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.media-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.media-layout h3 {
  margin-bottom: 12px;
}

.compact .resource-card {
  grid-template-columns: auto 1fr;
}

.compact .resource-card a {
  grid-column: 2;
  grid-row: 3;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 4vw, 48px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer a {
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

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

  .hero-media {
    min-height: 260px;
    order: 2;
  }

  .tool-grid,
  .media-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .password-row,
  .tool-grid,
  .media-layout {
    grid-template-columns: 1fr;
  }

  .site-header {
    gap: 12px;
  }

  .ghost-button {
    padding: 0 12px;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    max-width: 11ch;
  }

  .tool-card {
    min-height: 0;
  }

  .resource-card,
  .compact .resource-card {
    grid-template-columns: 1fr;
  }

  .resource-card h3,
  .resource-card p,
  .resource-card a,
  .compact .resource-card a,
  .resource-meta {
    grid-column: 1;
    grid-row: auto;
  }

  .resource-meta {
    width: max-content;
    height: auto;
    padding: 8px 10px;
  }

  .site-footer {
    flex-direction: column;
  }
}
