:root {
  --color-cream: #FDF6E3;
  --color-sunny-yellow: #FFD700;
  --color-sky-blue: #87CEEB;
  --color-rich-orange: #FF8C00;
  --color-deep-brown: #3E2723;

  --font-heading: 'Fredoka One', sans-serif;
  --font-body: 'Nunito', sans-serif;

  --text-display: clamp(2rem, 5vw, 3rem);
  --text-h1: clamp(1.75rem, 4vw, 2.5rem);
  --text-h2: clamp(1.5rem, 3vw, 2rem);
  --text-h3: clamp(1.25rem, 2.5vw, 1.5rem);
  --text-body: 1rem;
  --text-small: 0.875rem;

  --leading-display: 1.1;
  --leading-h1: 1.2;
  --leading-h2: 1.2;
  --leading-h3: 1.3;
  --leading-body: 1.6;
  --leading-small: 1.5;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 4rem;

  --container-max: 1200px;
  --section-padding: var(--space-xxl);
  --card-padding: 1.5rem;
  --card-margin: 1rem;

  --surface-primary: var(--color-cream);
  --surface-accent-yellow: var(--color-sunny-yellow);
  --surface-accent-blue: var(--color-sky-blue);

  --border-thick: 3px solid var(--color-deep-brown);
  --border-medium: 2px solid var(--color-deep-brown);
  --border-thin: 1px solid var(--color-deep-brown);

  --shadow-subtle: 0 2px 4px rgba(0, 0, 0, 0.1);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 50%;

  --transition-fast: 0.2s ease-in-out;
  --focus-ring: 2px solid var(--color-rich-orange);
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-deep-brown);
  background-color: var(--surface-primary);
  min-height: 100vh;
  overflow-x: hidden;
  hyphens: auto;
  overflow-wrap: break-word;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img,
video {
  object-fit: cover;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--color-deep-brown);
  overflow-wrap: break-word;
  hyphens: auto;
}

h1 {
  font-size: var(--text-h1);
  line-height: var(--leading-h1);
  margin-block-end: var(--space-md);
}

h2 {
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
  margin-block-end: var(--space-md);
}

h3 {
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  margin-block-end: var(--space-sm);
}

h4,
h5,
h6 {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  margin-block-end: var(--space-sm);
}

p {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  margin-block-end: var(--space-md);
  overflow-wrap: break-word;
  hyphens: auto;
}

p:last-child {
  margin-block-end: 0;
}

ul,
ol {
  margin-block-end: var(--space-md);
  padding-inline-start: var(--space-lg);
}

ul:last-child,
ol:last-child {
  margin-block-end: 0;
}

blockquote {
  margin-block-end: var(--space-md);
  padding-inline-start: var(--space-md);
  border-inline-start: var(--border-medium);
  font-style: italic;
}

blockquote:last-child {
  margin-block-end: 0;
}

figure {
  margin-block-end: var(--space-md);
}

figure:last-child {
  margin-block-end: 0;
}

figcaption {
  font-size: var(--text-small);
  line-height: var(--leading-small);
  margin-block-start: var(--space-xs);
}

a {
  color: var(--color-deep-brown);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

a:hover {
  color: var(--color-rich-orange);
  text-decoration-color: var(--color-rich-orange);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

button:active {
  transform: scale(0.98);
}

input,
select,
textarea {
  background-color: var(--surface-primary);
  border: var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  width: 100%;
  max-width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: var(--focus-ring);
  outline-offset: 1px;
}

textarea {
  resize: vertical;
  min-height: 6rem;
}

label {
  display: inline-block;
  margin-block-end: var(--space-xs);
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-block-end: var(--space-md);
}

table:last-child {
  margin-block-end: 0;
}

th,
td {
  border: var(--border-thin);
  padding: var(--space-sm) var(--space-md);
  text-align: start;
}

th {
  font-family: var(--font-heading);
  font-weight: 400;
  background-color: var(--surface-accent-yellow);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.section {
  padding-block: var(--section-padding);
}

.surface-card {
  background-color: var(--surface-primary);
  border: var(--border-medium);
  border-radius: var(--radius-lg);
  padding: var(--card-padding);
  margin-block-end: var(--card-margin);
  box-shadow: var(--shadow-subtle);
}

.surface-card:last-child {
  margin-block-end: 0;
}

.surface-accent-yellow {
  background-color: var(--surface-accent-yellow);
}

.surface-accent-blue {
  background-color: var(--surface-accent-blue);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-deep-brown);
  background-color: var(--color-sunny-yellow);
  border: var(--border-medium);
  border-radius: var(--radius-full);
  padding: var(--space-sm) var(--space-lg);
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.btn:hover {
  background-color: var(--color-rich-orange);
  color: var(--color-deep-brown);
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-secondary {
  background-color: var(--color-sky-blue);
}

.btn-secondary:hover {
  background-color: var(--color-rich-orange);
}

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

.rounded-sm {
  border-radius: var(--radius-sm);
}

.rounded-md {
  border-radius: var(--radius-md);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.rounded-full {
  border-radius: var(--radius-full);
}

.border-thick {
  border: var(--border-thick);
}

.border-medium {
  border: var(--border-medium);
}

.shadow-subtle {
  box-shadow: var(--shadow-subtle);
}

.text-small {
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

.text-display {
  font-family: var(--font-heading);
  font-size: var(--text-display);
  line-height: var(--leading-display);
  color: var(--color-deep-brown);
  margin-block-end: var(--space-md);
}

.text-display:last-child {
  margin-block-end: 0;
}

ul {
  list-style: none !important;
}

.nav-toggle {
  flex-direction: column;
}

@media (max-width: 768px) {
  :root {
    --section-padding: var(--space-lg);
  }

  .section {
    padding-block: var(--section-padding);
  }
}