/* Andy Bell's Modern CSS Reset */
/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body, h1, h2, h3, h4,
figure, blockquote, dl, dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: 1.5;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

/* Balance text wrapping on headings */
h1, h2,
h3, h4 {
  text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

/* Utopia Fluid Typography - Larger base */
:root {
  --step--2: clamp(0.91rem, calc(0.89rem + 0.10vw), 0.97rem);
  --step--1: clamp(1.09rem, calc(1.06rem + 0.15vw), 1.16rem);
  --step-0: clamp(1.31rem, calc(1.25rem + 0.21vw), 1.39rem);
  --step-1: clamp(1.57rem, calc(1.48rem + 0.29vw), 1.67rem);
  --step-2: clamp(1.88rem, calc(1.75rem + 0.38vw), 1.99rem);
  --step-3: clamp(2.26rem, calc(2.06rem + 0.52vw), 2.39rem);
  --step-4: clamp(3.5rem, calc(3.2rem + 0.68vw), 4rem);
  --step-5: clamp(4.2rem, calc(3.8rem + 0.89vw), 4.8rem);
  --box-padding: 2.5rem;
  --flow-space: 1.5rem;
}

body {
  font-size: var(--step-0);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h1 {
  font-size: var(--step-4);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: bold;
}

/* Every Layout inspired styles */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space, 1.5rem);
}

.box {
  padding: var(--box-padding);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Flow utility for vertical rhythm */
.flow > * + * {
  margin-block-start: var(--flow-space);
}

main {
  margin-top: 3rem;
}

/* CUBE CSS utilities */
.field {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2c3e50;
}

input, textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #7f8c8d;
  border-radius: 8px;
  font-size: var(--step-0);
  transition: border-color 0.3s ease;
  background: #fff;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

button {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: var(--step-0);
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
}

button:active {
  transform: translateY(0);
}

/* Winter theme */
body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #2c3e50;
  position: relative;
  overflow-x: hidden;
}

main {
  max-width: 65ch;
  margin: 5rem auto 0;
  position: relative;
  z-index: 1;
}

/* Snow animation */
.snowflakes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.snowflake {
  position: absolute;
  color: #fff;
  font-size: 1.5rem;
  animation: snowfall linear infinite;
  opacity: 0.8;
}

.snowflake:nth-child(1) { left: 5%; animation-duration: 10s; animation-delay: -1s; }
.snowflake:nth-child(2) { left: 10%; animation-duration: 12s; animation-delay: -2s; }
.snowflake:nth-child(3) { left: 15%; animation-duration: 8s; animation-delay: -3s; }
.snowflake:nth-child(4) { left: 20%; animation-duration: 15s; animation-delay: -4s; }
.snowflake:nth-child(5) { left: 25%; animation-duration: 10s; animation-delay: -5s; }
.snowflake:nth-child(6) { left: 30%; animation-duration: 12s; animation-delay: -6s; }
.snowflake:nth-child(7) { left: 35%; animation-duration: 9s; animation-delay: -7s; }
.snowflake:nth-child(8) { left: 40%; animation-duration: 14s; animation-delay: -8s; }
.snowflake:nth-child(9) { left: 45%; animation-duration: 11s; animation-delay: -9s; }
.snowflake:nth-child(10) { left: 50%; animation-duration: 13s; animation-delay: -10s; }
.snowflake:nth-child(11) { left: 55%; animation-duration: 10s; animation-delay: -11s; }
.snowflake:nth-child(12) { left: 60%; animation-duration: 12s; animation-delay: -12s; }
.snowflake:nth-child(13) { left: 65%; animation-duration: 8s; animation-delay: -13s; }
.snowflake:nth-child(14) { left: 70%; animation-duration: 15s; animation-delay: -14s; }
.snowflake:nth-child(15) { left: 75%; animation-duration: 10s; animation-delay: -15s; }
.snowflake:nth-child(16) { left: 80%; animation-duration: 12s; animation-delay: -16s; }
.snowflake:nth-child(17) { left: 85%; animation-duration: 9s; animation-delay: -17s; }
.snowflake:nth-child(18) { left: 90%; animation-duration: 14s; animation-delay: -18s; }
.snowflake:nth-child(19) { left: 95%; animation-duration: 11s; animation-delay: -19s; }
.snowflake:nth-child(20) { left: 100%; animation-duration: 13s; animation-delay: -20s; }

@keyframes snowfall {
  0% { top: -10%; transform: translateX(0); }
  100% { top: 110%; transform: translateX(50px); }
}