/* ============================================================
   Duck Rockets — global styles
   Design tokens + self-hosted Montserrat. Section styles: Task 5.
   ============================================================ */

:root {
  --cyan: #00CCFF;
  --yellow: #FFFF00;
  --orange: #FF6600;
  --orange-warm: #FF9900;
  --amber: #FFAE0D;
  --yellow-deep: #FFCC00;
  --orange-dark: #D15A10;
  --black: #000000;
  --white: #FFFFFF;

  --font: 'Montserrat', system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/montserrat-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/montserrat-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/montserrat-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/montserrat-800.woff2') format('woff2');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('assets/fonts/montserrat-900.woff2') format('woff2');
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
}

h1,
h2,
h3 {
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

/* ============================================================
   Layout helpers
   ============================================================ */

.container {
  width: 100%;
  max-width: 1150px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.section {
  padding-block: clamp(56px, 9vw, 110px);
}

.section--white {
  background: var(--white);
}

.band--cyan { background: var(--cyan); }
.band--yellow { background: var(--yellow); }
.band--orange { background: var(--orange); }
.band--black { background: var(--black); color: var(--white); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  font-size: 0.75rem;
  margin: 0 0 0.75rem;
}

.section__title {
  font-size: clamp(1.75rem, 4.2vw, 2.75rem);
  margin: 0 0 1rem;
}

/* ============================================================
   Buttons (used by the 404 page) and tags
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85em 1.6em;
  min-height: 44px;
  border: 2px solid var(--black);
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn--black { background: var(--black); color: var(--white); }
.btn--black:hover { background: var(--orange); border-color: var(--orange); }

.tag {
  display: inline-block;
  align-self: flex-start;
  padding: 0.3em 0.75em;
  border: 1.5px solid var(--black);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Comfortable tap targets (>=44px) for interactive links and buttons */
.site-footer__top,
.contact__email,
.copy-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--black);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 8px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* ============================================================
   Masthead (merged header + hero)
   ============================================================ */

.masthead {
  --masthead-col: 460px;
  /* Pull the logo up by this fraction of the logo width so the "DUCK ROCKETS"
     wordmark lines up with the text block beside it. */
  --wordmark-offset: 31.6%;
}

.masthead__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  padding-block: clamp(80px, 13vw, 140px) clamp(48px, 8vw, 96px);
}

.masthead__logo {
  width: min(var(--masthead-col), 100%);
}

.masthead__logo img {
  width: 100%;
  height: auto;
  margin-top: calc(-1 * var(--wordmark-offset));
}

.masthead__copy {
  max-width: var(--masthead-col);
}

.masthead__title {
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}

.masthead__lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  margin: 0;
  max-width: 34ch;
}

/* ============================================================
   Games
   ============================================================ */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(18px, 3vw, 28px);
  margin-top: 2rem;
}

.game-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.game-card__img {
  width: 100%;
  height: auto;
  aspect-ratio: 750 / 560;
  object-fit: cover;
}

.game-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.1rem 1.15rem 1.35rem;
}

.game-card__title {
  font-size: 1.35rem;
  margin: 0.6rem 0 0.4rem;
}

.game-card__text {
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.game-card__link {
  align-self: flex-start;
  margin-top: auto;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 3px solid var(--cyan);
  padding-bottom: 2px;
}

.game-card__link:hover { border-color: var(--orange); }

/* ============================================================
   About
   ============================================================ */

.about__text {
  max-width: 68ch;
  font-size: 1.05rem;
  margin: 0;
}

/* ============================================================
   Contact
   ============================================================ */

.contact { color: var(--white); }

.contact__lead { font-weight: 600; margin: 0 0 1.5rem; }

.contact__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.contact__email {
  font-size: clamp(1.2rem, 4vw, 2.1rem);
  font-weight: 800;
  text-decoration: none;
  word-break: break-word;
}

.contact__email:hover { text-decoration: underline; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.copy-btn:hover { opacity: 0.7; }
.copy-btn:active { opacity: 1; }

.copy-btn__icon { display: block; }

/* The "Copied!" message must not reserve space, or it pushes the block's
   content up and makes the vertical padding look uneven. It overlays the
   bottom padding instead. */
.contact__status {
  height: 0;
  min-height: 0;
  margin: 0;
  position: relative;
  top: 0.6rem;
  overflow: visible;
  font-weight: 700;
}

/* Keep focus rings visible on the orange contact band. */
.band--orange :focus-visible { outline-color: var(--black); }

/* ============================================================
   Footer
   ============================================================ */

.site-footer { padding-block: clamp(40px, 6vw, 64px); }

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
}

.site-footer__brand img { height: 32px; width: auto; }

.site-footer__legal { font-size: 0.85rem; }

.site-footer__top { font-weight: 700; text-decoration: none; margin-left: auto; }
.site-footer__top:hover { color: var(--cyan); }

/* ============================================================
   Progressive enhancement: hidden until JS is present
   ============================================================ */

html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Responsive — safety rails and 1:1 foldables
   ============================================================ */

@media (max-width: 768px) {
  .masthead__inner {
    grid-template-columns: 1fr;
    gap: clamp(22px, 6vw, 40px);
  }

  .masthead__logo img { margin-top: 0; }
}

@media (max-width: 480px) {
  .masthead__title { font-size: clamp(1.7rem, 8vw, 2.3rem); }
}

/* Short / folded screens: tighten spacing */
@media (max-height: 520px) {
  .masthead__inner { padding-block: 28px; }
  .section { padding-block: 40px; }
}

/* Near-square viewports (foldables): stack the masthead */
@media (aspect-ratio: 1 / 1) {
  .masthead__inner { grid-template-columns: 1fr; }
  .masthead__logo img { margin-top: 0; }
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transform: none !important;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
  }

  .game-card:hover { transform: none; }
}

/* Guard against any horizontal overflow */
html,
body {
  overflow-x: hidden;
}
