/* DanWarp link page.
   Layout follows Dan's two mockups: a 2x2 grid of neon "pill" buttons on wide
   screens, a single column on phones, logo on top and a round Contact button
   underneath. Sizes are in rem where they relate to text, so they follow the
   visitor's browser font size. */

:root {
  --bg: #080e60;
  --text: #fff;

  /* Wide-screen sizes */
  --logo-w: 500px;
  --pill-w: 350px;
  --pill-h: 68px;
  --pill-pad: 30px;      /* space before the icon */
  --icon: 44px;
  --font: 1.3rem;        /* ~21px */
  --col-gap: 110px;
  --row-gap: 34px;
  --contact: 124px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  font-family: Montserrat, "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg) url("background.webp") center / cover no-repeat fixed;
}

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  width: 100%;
}

/* ---------- Logo ---------- */

.logo { position: relative; margin: 0; width: min(100%, var(--logo-w)); }
.logo img { display: block; width: 100%; height: auto; }
/* Animated streak (streak.js) drawn over the logo; same box as the image */
.logo canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- Social buttons ---------- */

.social {
  display: grid;
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;           /* fill down each column */
  grid-auto-columns: minmax(0, var(--pill-w));
  justify-content: center;
  width: min(100%, calc(2 * var(--pill-w) + var(--col-gap)));
  gap: var(--row-gap) var(--col-gap);
  margin-top: -18px;                /* logo artwork has empty space at its foot */
}

.btn {
  /* each button sets --face (background), --rim (border colour) and --glow */
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--pill-h);
  padding: 8px 22px 8px var(--pill-pad);
  border: 2px solid var(--rim);
  border-radius: 999px;
  background: var(--face);
  color: var(--text);
  text-decoration: none;
  box-shadow:
    0 0 3px var(--rim),
    0 0 8px var(--glow),
    0 0 18px var(--glow),
    0 0 34px color-mix(in srgb, var(--glow) 55%, transparent),
    inset 0 0 12px color-mix(in srgb, var(--glow) 70%, transparent),
    inset 0 2px 0 rgb(255 255 255 / .25);
  transition: transform .16s, filter .16s;
}

.icon {
  flex: none;
  width: var(--icon);
  height: var(--icon);
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / .45));
}

.pipe {
  flex: none;
  width: 2px;
  height: 1.55em;
  font-size: var(--font);
  background: #fff;
  border-radius: 1px;
  opacity: .9;
}

.label {
  font-size: var(--font);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: break-word;          /* never spill out if text is enlarged */
  text-shadow: 0 1px 3px rgb(0 0 0 / .55);
}

/* Colours. Every gradient stays at 4.5:1 or better against white
   where the label sits; the light ends are only under the icon. */
.youtube {
  --rim: #ff9a9a;
  --glow: #ff1f1f;
  --face: linear-gradient(180deg, #e4141b 0%, #b30008 55%, #7a0005 100%);
}
.instagram {
  --rim: #ffb0f0;
  --glow: #ff2fd0;
  --face: linear-gradient(100deg, #ffc400 0%, #ff6a1a 12%, #d1006f 30%, #a300b8 62%, #5a1ee0 100%);
}
.tiktok {
  --rim: #b0fcff;
  --glow: #00e5ff;
  --face: linear-gradient(180deg, #063f4a 0%, #031f27 60%, #02131a 100%);
}
.facebook {
  --rim: #a0d8ff;
  --glow: #1f8bff;
  --face: linear-gradient(180deg, #1a5cf0 0%, #0d3ec4 55%, #0a2a96 100%);
}

/* ---------- Contact button ---------- */

.contact {
  --rim: #ffb0ff;
  --glow: #e600ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: var(--contact);
  min-height: var(--contact);
  aspect-ratio: 1;
  margin-top: -24px;
  border: 2px solid var(--rim);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #4a0a9e 0%, #24065f 60%, #14033f 100%);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  box-shadow:
    0 0 3px var(--rim),
    0 0 8px var(--glow),
    0 0 18px var(--glow),
    0 0 36px color-mix(in srgb, var(--glow) 50%, transparent),
    inset 0 0 14px color-mix(in srgb, var(--glow) 60%, transparent);
  transition: transform .16s, filter .16s;
}
.contact span {
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.contact .plane { width: 34px; height: 28px; }
.contact .arrow { width: 24px; height: 15px; }

/* ---------- Interaction ---------- */

@media (hover: hover) {
  .btn:hover, .contact:hover { transform: translateY(-2px); filter: brightness(1.12); }
}

/* White ring plus dark halo, so focus shows on both the dark and bright parts of the artwork */
.btn:focus-visible, .contact:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 6px;
  box-shadow: 0 0 0 2px #000, 0 0 0 12px rgb(0 0 0 / .6);
}

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

/* ---------- Medium widths: shrink the grid before switching to one column ---------- */

@media (max-width: 900px) {
  :root {
    --pill-w: 330px;
    --pill-h: 60px;
    --pill-pad: 22px;
    --icon: 36px;
    --font: 1.05rem;
    --col-gap: 32px;
    --row-gap: 26px;
  }
}

/* ---------- Phones: one column, YouTube / Instagram / TikTok / Facebook ---------- */

@media (max-width: 720px) {
  :root {
    --logo-w: 340px;
    --pill-w: min(100%, 290px);
    --pill-h: 50px;
    --pill-pad: 30px;
    --icon: 34px;
    --font: 1rem;
    --row-gap: 18px;
    --contact: 104px;
  }
  body { padding: 32px 20px; }
  .page { gap: 52px; }
  .social {
    grid-auto-flow: row;
    grid-template-rows: none;
    grid-template-columns: var(--pill-w);
    justify-content: center;
    width: 100%;
    margin-top: -14px;
  }
  .btn { gap: 13px; padding-right: 16px; }
  .contact { margin-top: -8px; }
  .contact span { font-size: .875rem; }
  .contact .plane { width: 30px; height: 25px; }
}

/* Portrait artwork for phones and narrow portrait tablets */
@media (max-width: 720px), (orientation: portrait) and (max-width: 900px) {
  body { background-image: url("background-mobile.webp"); background-attachment: scroll; }
}

/* ---------- Accessibility preferences ---------- */

/* Windows High Contrast / forced colours */
@media (forced-colors: active) {
  .btn, .contact { border-color: ButtonText; box-shadow: none; }
  .pipe { background: ButtonText; }
  .btn:focus-visible, .contact:focus-visible { outline-color: Highlight; box-shadow: none; }
}

/* "Increase contrast" setting: drop glows and use solid dark faces */
@media (prefers-contrast: more) {
  .btn, .contact { background: #000; border-color: #fff; box-shadow: none; }
  .label { text-shadow: none; }
}
