/* Colours from the Creative Coast design system */
:root {
  --accent: #5e88ba;      /* change this one colour to re-theme the page */
  --accent-dark: #3d6799;
  --ink: #141f29;
  --ink-2: #202a34;
  --on-ink: #f0f3f5;
  --muted-on-ink: #aeb3b8;
  --muted: #657381;
  --page: #f9fafb;
  --card: #ffffff;
  --line: #dbe2e6;
  --max: 480px;

  /*
   * Text, buttons and icons stay full size. Only the spacing and the logo
   * shrink a little on shorter screens so the page fits without scrolling.
   * "vh" is the fallback; "dvh" (the visible height, not counting the phone
   * browser's address bar) wins where supported.
   */
  --hero-top: clamp(14px, 5vh, 44px);
  --hero-gap: clamp(4px, 1.5vh, 14px);
  --wave: clamp(32px, 7vh, 60px);
  --logo-w: clamp(150px, 21vh, 220px);
  --h1: 30px;
  --tagline: 15px;
  --link-h: clamp(52px, 6.9vh, 58px);
  --link-gap: clamp(6px, 1.2vh, 10px);
  --link-font: 17px;
  --icon: 36px;
}

@supports (height: 100dvh) {
  :root {
    --hero-top: clamp(14px, 5dvh, 44px);
    --hero-gap: clamp(4px, 1.5dvh, 14px);
    --wave: clamp(32px, 7dvh, 60px);
    --logo-w: clamp(150px, 21dvh, 220px);
    --h1: 30px;
    --tagline: 15px;
    --link-h: clamp(52px, 6.9dvh, 58px);
    --link-gap: clamp(6px, 1.2dvh, 10px);
    --link-font: 17px;
    --icon: 36px;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font-family: 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- Header with waves ---------- */
.hero {
  position: relative;
  flex: none;
  background: var(--ink);
  color: var(--on-ink);
  padding: var(--hero-top) 24px calc(var(--wave) + 12px);
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--hero-gap);
  text-align: center;
}

.logo {
  display: block;
  width: var(--logo-w);
  max-width: 70%;
  height: auto;
}

h1 {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 900;
  font-size: var(--h1);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.accent { color: var(--accent); }

.tagline {
  margin: 0;
  font-size: var(--tagline);
  line-height: 1.45;
  color: var(--muted-on-ink);
}

.waves {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: var(--wave);
}

/* ---------- Link buttons ---------- */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.links {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 4px 24px 0;
  display: flex;
  flex-direction: column;
  gap: var(--link-gap);
}

.link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--link-h);
  padding: 0 16px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 500;
  font-size: var(--link-font);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

/* Hover lift only on devices with a mouse (avoids "stuck" hover after a tap on phones) */
@media (hover: hover) {
  .link:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 6px 12px -4px rgba(0, 0, 0, 0.12);
  }
}

.link:active { border-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .link { transition: none; }
  .link:hover { transform: none; }
}

.link:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 2px;
}

.icon {
  width: var(--icon);
  height: var(--icon);
  flex: none;
  border-radius: 9999px;
  border: 2px solid var(--accent);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.label { flex: 1; }

.chevron { color: var(--muted); flex: none; }

/* ---------- Footer ---------- */
.footer {
  flex: none;
  padding: clamp(8px, 2vh, 16px) 24px clamp(10px, 3vh, 28px);
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Short screens: hide the small extras (never shrink text) ---------- */
@media (max-height: 760px) {
  .tagline { display: none; }
}

@media (max-height: 640px) {
  .hero h1 { display: none; }   /* the logo already says Creative Coast */
}

@media (max-height: 560px) {
  .footer { display: none; }
  .links { padding-bottom: 10px; }
}

/* ---------- Phone held sideways (wide and short): two columns ---------- */
@media (orientation: landscape) and (max-height: 540px) {
  body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
  }

  .hero {
    grid-row: 1 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
  }

  .waves { display: none; }

  .logo { width: clamp(110px, 32vh, 200px); }

  .hero h1 { display: block; }

  main { justify-content: center; }

  .links { padding: 12px 24px 0; }

  .footer { padding: 6px 24px 10px; }
}

/* ---------- Very short screens (rare): smaller logo, tighter gaps ---------- */
@media (max-height: 500px) {
  :root { --logo-w: 120px; --link-gap: 5px; }
}

@media (orientation: landscape) and (max-height: 340px) {
  :root { --link-h: 44px; }
  .footer { display: none; }
  .links { padding: 8px 24px; }
}
