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

/* lock horizontal overflow (prevents “zoomed out feels like overflow”) */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

:root {
  --dark: #071821;
  --greendark: #1a5744;
  --greenmid:#2d7750;
  --green:#99ce9b;
  --greenlight:#c1e8aa;
  --light:#dbe8d9;

  --bg:#aedea7;
  --text:#071821;
  --main:#d9f3c4;

  --greenone: #306850;

  --outline-light:
    -2px -2px 0 var(--greenlight),
    -1px -2px 0 var(--greenlight),
     0px -2px 0 var(--greenlight),
     1px -2px 0 var(--greenlight),
     2px -2px 0 var(--greenlight),

    -2px -1px 0 var(--greenlight),
    -1px -1px 0 var(--greenlight),
     0px -1px 0 var(--greenlight),
     1px -1px 0 var(--greenlight),
     2px -1px 0 var(--greenlight),

    -2px  0px 0 var(--greenlight),
    -1px  0px 0 var(--greenlight),
     1px  0px 0 var(--greenlight),
     2px  0px 0 var(--greenlight),

    -2px  1px 0 var(--greenlight),
    -1px  1px 0 var(--greenlight),
     0px  1px 0 var(--greenlight),
     1px  1px 0 var(--greenlight),
     2px  1px 0 var(--greenlight),

    -2px  2px 0 var(--greenlight),
    -1px  2px 0 var(--greenlight),
     0px  2px 0 var(--greenlight),
     1px  2px 0 var(--greenlight),
     2px  2px 0 var(--greenlight);

  --outline-dark:
    -2px -2px 0 var(--greendark),
    -1px -2px 0 var(--greendark),
     0px -2px 0 var(--greendark),
     1px -2px 0 var(--greendark),
     2px -2px 0 var(--greendark),

    -2px -1px 0 var(--greendark),
    -1px -1px 0 var(--greendark),
     0px -1px 0 var(--greendark),
     1px -1px 0 var(--greendark),
     2px -1px 0 var(--greendark),

    -2px  0px 0 var(--greendark),
    -1px  0px 0 var(--greendark),
     1px  0px 0 var(--greendark),
     2px  0px 0 var(--greendark),

    -2px  1px 0 var(--greendark),
    -1px  1px 0 var(--greendark),
     0px  1px 0 var(--greendark),
     1px  1px 0 var(--greendark),
     2px  1px 0 var(--greendark),

    -2px  2px 0 var(--greendark),
    -1px  2px 0 var(--greendark),
     0px  2px 0 var(--greendark),
     1px  2px 0 var(--greendark),
     2px  2px 0 var(--greendark);
}

body {
  font-family: 'VT323', monospace;
  background-image: url("/img/bg.png");
  background-repeat: repeat;
  background-attachment: fixed;
  background-color: var(--bg);
  background-size: cover;
  color: var(--text);
  line-height: 1.6;
  font-size: 1.5rem;
  padding: 1rem;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  width: 100%;
}

a { color: var(--greenmid); }
a:hover { color: var(--greendark); }

.container {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}

p { padding: 0.5rem; }

.twocol {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.col {
  flex: 1 1 45%;
  border: 4px dashed var(--green);
  padding: 1rem;
}

.outline {
  color: var(--greenlight);
  text-shadow: var(--outline-dark);
  font-weight: bold;
  text-transform: uppercase;
  display: block;
  text-align: center;
  margin: 1.5rem 0;
}

/* --- header --- */
.header-image {
  text-align: center;
  background-image: url('/img/header-slow.gif');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center 35%;
  width: 100%;
  height: 200px;
}

header {
  width: 100%;
  height: auto;
  margin: 0 auto;
  padding: 3rem;
}

h1 {
  font-size: 3rem;
  text-align: right;
  color: var(--green);
  text-shadow: var(--outline-light);
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  color: var(--green);
  text-shadow: var(--outline-dark);
  text-align: center;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  color: var(--dark);
  text-shadow: var(--outline-light);
  text-align: center;
  margin-top: 1rem;
  width: 100%;
}

nav {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  z-index: 1000;
  color: var(--green);
  text-shadow: var(--outline-light);
  max-width: 100%;
}

.nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  max-width: 100%;
}

.nav-links a {
  color: var(--text);
  border-bottom: 2px solid transparent;
  transition: border 0.2s ease-in-out;
}
.nav-links a:hover { border-color: var(--green); }

.nav-links li::before {
  content: "";
  width: 32px;
  height: 32px;
  background-size: contain;
  background-repeat: no-repeat;
  position: absolute;
  margin-left: 1rem;
  margin-right: 1rem;
}

.nav-links li:nth-child(1n)::before { background-image: url("/img/icons/small/1.png");  margin-top: -1.2rem; margin-left: 1.5rem; }
.nav-links li:nth-child(2n)::before { background-image: url("/img/icons/small/2.png");  margin-top: 1.8rem; }
.nav-links li:nth-child(3n)::before { background-image: url("/img/icons/small/3.png"); margin-top: -2rem; }
.nav-links li:nth-child(4n)::before { background-image: url("/img/icons/small/4.png"); margin-top: 3rem; }
.nav-links li:nth-child(5n)::before { background-image: url("/img/icons/small/5.png"); }

ul { padding: 1rem; }

.iconbullets {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0;
}

.iconbullets li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 0.5rem;
  line-height: 32px;
}

.pawbullets li::before,
.bonebullets li::before,
.iconbullets li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  background-size: contain;
  background-repeat: no-repeat;
}

.pawbullets li::before { background-image: url("/img/icons/small/8.png"); }
.bonebullets li::before { background-image: url("/img/icons/small/11.png"); }

.pawbullets,
.bonebullets {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0;
}

.pawbullets li,
.bonebullets li {
  position: relative;
  padding-left: 40px;
  line-height: 32px;
}

/* rotating bullet icons */
.iconbullets li:nth-child(1n)::before { background-image: url("/img/icons/small/1.png"); }
.iconbullets li:nth-child(2n)::before { background-image: url("/img/icons/small/2.png"); }
.iconbullets li:nth-child(3n)::before { background-image: url("/img/icons/small/3.png"); }
.iconbullets li:nth-child(4n)::before { background-image: url("/img/icons/small/4.png"); }
.iconbullets li:nth-child(5n)::before { background-image: url("/img/icons/small/5.png"); }
.iconbullets li:nth-child(6n)::before { background-image: url("/img/icons/small/7.png"); }

/* --- Icons --- */
.icon {
  width:56px;
  height:56px;
  padding: 1rem;
  border: none;
  display: inline-block;
  flex: 0 0 56px;
  aspect-ratio: 1 / 1;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s ease;
}

.icon.dogsprite {background-image:url("/img/dog1.png"); }
.icon.dogsprite:hover {background-image:url("/img/dog1.GIF"); }

.icon.pawprint { background-image:url("/img/icons/F11.png"); }
.icon.pawprint:hover { background-image:url("/img/icons/F12.png"); }

.icon.ball { background-image:url("/img/icons/F14.png"); }
.icon.ball:hover { background-image:url("/img/icons/F13.png"); }

.icon.shake { background-image:url("/img/icons/F2.png"); }
.icon.shake:hover { background-image:url("/img/icons/F1.png"); }

.icon.face { background-image:url("/img/icons/F7.png"); }
.icon.face:hover { background-image:url("/img/icons/F6.png"); }

.icon.squirrel { background-image:url("/img/icons/F16-1.png"); }
.icon.squirrel:hover { background-image:url("/img/icons/F16.png"); }

.icon.dog { background-image:url("/img/icons/F3.png"); }
.icon.dog:hover { background-image:url("/img/icons/F4.png"); }

.icon.bone { background-image:url("/img/F6.png"); }

.icon.duckie { background-image:url("/img/icons/F15.png"); }
.icon.clover { background-image:url("/img/icons/F18.png"); }
.icon.acorn  { background-image:url("/img/icons/F17.png"); }

.iconsmall {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  aspect-ratio: 1 / 1;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s ease;
  display: inline-block;
  padding: 0;
  margin: 2px;
}
.iconsmall-1 { background-image: url("/img/icons/small/1.png"); }
.iconsmall-2 { background-image: url("/img/icons/small/2.png"); }
.iconsmall-3 { background-image: url("/img/icons/small/3.png"); }
.iconsmall-4 { background-image: url("/img/icons/small/4.png"); }
.iconsmall-5 { background-image: url("/img/icons/small/5.png"); }
.iconsmall-6 { background-image: url("/img/icons/small/6.png"); }
.iconsmall-7 { background-image: url("/img/icons/small/7.png"); }
.iconsmall-8 { background-image: url("/img/icons/small/8.png"); }
.iconsmall-9 { background-image: url("/img/icons/small/9.png"); }
.iconsmall-10 { background-image: url("/img/icons/small/10.png"); }
.iconsmall-11 { background-image: url("/img/icons/small/11.png"); }
.iconsmall-12 { background-image: url("/img/icons/small/12.png"); }
.iconsmall-13 { background-image: url("/img/icons/small/13.png"); }

/* =========================
   PHOTOS
========================= */

.photo-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 100%;
}

.photo-wrapper {
  position: relative;
  flex: 1 1 200px;
  max-width: 255px;
  aspect-ratio: 255 / 273;
  width: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.photo1 { background-image: url("/img/photo1.png"); }
.photo2 { background-image: url("/img/photo2.png"); }
.photo3 { background-image: url("/img/photo3.png"); }

.photo-inner {
  position: absolute;
  top: 17%;
  left: 22%;
  width: 52%;
  aspect-ratio: 1/1;
  height: auto;
  z-index: 2;
  border: 4px solid var(--greendark);
}

.frame {
  max-height: 250px;
  max-width: 250px;
  border-radius: 6px;
  background-color: var(--green);
  display: flex;
  justify-content: center;
  align-content: center;
  margin: auto;
  aspect-ratio: 1/1;
}

.frame img {
  border: 10px solid var(--dark);
  width: 90%;
  height: 90%;
  display: block;
}

/* =========================
   MAIN LAYOUT
========================= */

.wide {
  grid-column: 1 / -1;
  background-color: var(--main);
  padding: 1rem;
  height: auto;
  border-radius: 1px;
  box-shadow:
    0 0 0 3px var(--greendark),
    15px 20px 0 0 var(--greenone);
}

.wide-wrapper {
  column-span: all;
  break-inside: avoid;
  width: 100%;
}

.wide-wrapper section.wide { width: 100%; }

main {
  column-count: 2;
  column-gap: 2rem;
  padding: 1rem;
  position: relative;
  max-width: 100%;
}

.paw {
  background-image: url("/img/paw.png");
  background-position: bottom 5px right 50%;
  background-repeat: no-repeat;
}

main section {
  display: block;
  width: 100%;
  background-color: var(--main);
  padding: 1.5rem;
  border-radius: 1px;
  margin: 2rem 0 2rem;
  box-shadow:
    0 0 0 3px var(--greendark),
    15px 20px 0 0 var(--greenone);
  break-inside: avoid;
}

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

/* --- dividers --- */
.divider {
  border: none;
  height: 10px;
  background-color: var(--green);
  width: 100%;
}

.pawborder {
  height: 32px;
  background-color: var(--greendark);
  -webkit-mask-image: url("/img/pawborder.png");
  -webkit-mask-repeat: repeat-x;
  -webkit-mask-size: contain;
  mask-image: url("/img/pawborder.png");
  mask-repeat: repeat-x;
  mask-size: contain;
}

.runner-lane {
  width: 100%;
  overflow: hidden;
  position: relative;
  height: 64px;
  margin: 2rem 0;
  background: var(--main);
}

.css-runner img {
  position: absolute;
  top: 0;
  left: 100%;
  width: 64px;
  height: auto;
  animation: runloop 11s linear infinite;
}

@keyframes runloop {
  from { left: -64px; }
  to   { right: -64px; }
}

.max100 { display: block; margin: auto; width: auto; max-height: 100px; }
.max150 { display: flex; margin: auto; width: auto; max-height: 150px; }
.max200 { display: block; margin: auto; width: auto; max-height: 200px; }
.max300 { display: block; margin: auto; width: auto; max-height: 300px; }

.centered-text { text-align: center; }

/* --- footer --- */
footer {
  text-align: center;
  padding: 2rem 1rem 1rem;
  font-size: 1.5rem;
  color: var(--green);
  text-shadow: var(--outline-light);
}

/* =========================
   WAVY LOGO
========================= */

.wavywords {
  display: inline-block;
  white-space: nowrap;
  font-family: 'VT323', monospace;
  font-size: 53px;
  font-weight: bold;
  transform-origin: center;
  max-width: 100%;
}

.wavywords span {
  display: inline-block;
  animation: logo-wavy 4.3s ease-in-out infinite;
  animation-delay: calc(0.1s * var(--i));
}

@keyframes logo-wavy {
  0% { transform: translateY(0); }
  20% { transform: translateY(-5px); }
  40%, 100% { transform: translateY(0); }
}

/* =========================
   PORTRAIT MENU + BUBBLES
========================= */

/* row */
.portrait-row {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  flex-wrap: nowrap;
}

/* wrapper is the hover owner */
.portrait-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

/* base portrait tile */
.portrait {
  width: 96px;
  height: 96px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;
  pointer-events: none;
  flex-shrink: 0;
}

.hover-inset {
  position: absolute;
  inset: 15px;
  pointer-events: none;
  background: transparent;
}

/* speech bubble */
.speech-bubble {
  --bubble-size: 50px;
  --tail-size: 6px;
  --tail-shadow-size: 8px;

  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  opacity: 0;
  pointer-events: none;

  width: auto;
  height: var(--bubble-size);
  aspect-ratio: 20 / 15;

  background: var(--main);
  color: var(--dark);
  border: 3px solid var(--greendark);
  border-radius: 3px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;

  font-size: 1.5rem;
  line-height: 1rem;

  box-shadow: 5px 10px 0 0 var(--greenone);

  transition:
    opacity 0.15s steps(2),
    transform 0.15s steps(2);

  z-index: 10;
  max-width: 90vw;
}

.speech-bubble .bubble-content {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.25rem;
  box-sizing: border-box;
  text-align: center;
  overflow: hidden;
}

/* tail shadow (geometry) */
.speech-bubble::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translate(5px, 10px);
  z-index: -1;

  width: 0;
  height: 0;

  border-left: var(--tail-shadow-size) solid transparent;
  border-right: var(--tail-shadow-size) solid transparent;
  border-top: var(--tail-shadow-size) solid var(--greenone);
}

/* tail outline */
.speech-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);

  width: 0;
  height: 0;

  border-left: var(--tail-size) solid transparent;
  border-right: var(--tail-size) solid transparent;
  border-top: var(--tail-size) solid var(--main);
}

/* show on hover */
.portrait-wrap:hover .speech-bubble,
.speech-bubble:hover {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* GB size presets */
.speech-bubble.gb-small {
  --bubble-size: 96px;
  --tail-size: 6px;
  --tail-shadow-size: 8px;
}
.speech-bubble.gb-medium {
  --bubble-size: 128px;
  --tail-size: 8px;
  --tail-shadow-size: 10px;
}
.speech-bubble.gb-large {
  --bubble-size: 160px;
  --tail-size: 10px;
  --tail-shadow-size: 12px;
}

/* portrait images */
.portrait1 { background-image:url("/img/icons/portraits/portrait1.png"); }
.portrait2 { background-image:url("/img/icons/portraits/portrait2.png"); }
.portrait3 { background-image:url("/img/icons/portraits/portrait3.png"); }
.portrait4 { background-image:url("/img/icons/portraits/portrait4.png"); }
.portrait5 { background-image:url("/img/icons/portraits/portrait5.png"); }

/* hover swaps */
.portrait-wrap:hover .portrait1 { background-image: url("/img/icons/portraits/portrait1b.png"); }
.portrait-wrap:hover .portrait2 { background-image: url("/img/icons/portraits/portrait2b.png"); }
.portrait-wrap:hover .portrait3 { background-image: url("/img/icons/portraits/portrait3b.png"); }
.portrait-wrap:hover .portrait4 { background-image: url("/img/icons/portraits/portrait4b.png"); }
.portrait-wrap:hover .portrait5 { background-image: url("/img/icons/portraits/portrait5b.png"); }

/* =========================
   RESPONSIVE TWEAKS
========================= */

/* ---------- Tablet / small laptop ---------- */
@media (max-width: 768px) {
  body {
    padding: 0.5rem;
    width: 100%;
    background-size: auto;
    background-repeat: repeat;
    background-attachment: scroll;
    max-width: 100%;
  }

  .container {
    max-width: 100%;
    padding: 0.5rem;
  }

  header, nav, footer {
    text-align: center;
    padding: 1rem 0.5rem;
  }

  header {
    padding: 0.75rem 0.5rem;
  }

  .photo-wrapper {
    margin-left: auto;
    margin-right: auto;
  }

  main {
    column-count: 1;
    column-gap: 1rem;
    padding: 0.5rem;
  }

  main section,
  .wide-wrapper section.wide {
    width: 100% !important;
    display: block;
  }

  .photo-row {
    flex-direction: column;
    gap: 1rem;
  }

  marquee {
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .twocol {
    flex-direction: column;
    gap: 1rem;
  }

  .icon-row,
  .icons-wrapper {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    max-width: 100%;
  }

  .icon,
  .iconsmall {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
  }

  ul.pawbullets li::before,
  ul.bonebullets li::before {
    width: 1.25rem;
    height: 1.25rem;
    top: 0.1rem;
  }

  /* wavy logo scale */
  .wavywords { transform: scale(0.8); }

  /* portraits can wrap on tablet */
  .portrait-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .portrait {
    width: 80px;
    height: 80px;
  }

  .speech-bubble.gb-small  { --bubble-size: 88px; }
  .speech-bubble.gb-medium { --bubble-size: 112px; }
  .speech-bubble.gb-large  { --bubble-size: 140px; }
}

/* ---------- Phone ---------- */
@media (max-width: 480px) {
  header { padding: 0.5rem 0.25rem; }
  .header-image { height: 140px; }

  /* wavy logo scale */
  .wavywords { transform: scale(0.65); }

  /* STACK PORTRAITS VERTICALLY (the fix you asked for) */
  .portrait-row {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
  }

  .portrait-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .portrait {
    width: 88px;
    height: 88px;
  }

  .speech-bubble.gb-small  { --bubble-size: 84px; }
  .speech-bubble.gb-medium { --bubble-size: 104px; }
  .speech-bubble.gb-large  { --bubble-size: 132px; }

  .nav-links { gap: 0.75rem; }
}

/* ---------- Very small phones ---------- */
@media (max-width: 360px) {
  body { padding: 0.25rem; }
  .header-image { height: 120px; }

  .wavywords { transform: scale(0.58); }

  .portrait-row {
    flex-direction: column;
    gap: 0.65rem;
  }

  .portrait {
    width: 80px;
    height: 80px;
  }

  .speech-bubble.gb-small  { --bubble-size: 76px; }
  .speech-bubble.gb-medium { --bubble-size: 96px; }
  .speech-bubble.gb-large  { --bubble-size: 120px; }
}
