/* Portside Games — shared stylesheet
   Self-contained: no web fonts, no CDNs, no third-party requests. */

:root {
  --bg:        #071018;
  --bg-deep:   #04090e;
  --surface:   #0d1c27;
  --surface-2: #132a38;
  --border:    #1d3a4c;
  --border-lit:#2a5a72;
  --text:      #dbe8f0;
  --muted:     #8ba6b7;
  --faint:     #5d7788;
  --accent:    #35d0d8;
  --accent-dim:#1c8f96;
  --brass:     #c98b4b;
  --rust:      #cf5b42;
  --radius:    14px;
  --radius-sm: 9px;
  --maxw:      1080px;
  --ease:      cubic-bezier(.22,.61,.36,1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Depth gradient: light at the surface, black in the hold. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 620px at 50% -8%, #16495a 0%, transparent 62%),
    linear-gradient(180deg, #0a1a25 0%, var(--bg) 38%, var(--bg-deep) 100%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-color: rgba(53,208,216,.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #04141a; padding: 10px 16px;
  font-weight: 700; z-index: 100; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,16,24,.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid rgba(29,58,76,.7);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 20px;
  min-height: 62px; flex-wrap: wrap;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text); text-decoration: none;
  margin-right: auto;
}
.brand .anchor { color: var(--accent); font-size: 19px; line-height: 1; }
.brand:hover { color: #fff; }

.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 7px 12px; border-radius: 999px; transition: color .18s, background .18s;
}
.site-nav a:hover { color: var(--text); background: rgba(53,208,216,.09); }
.site-nav a[aria-current="page"] { color: var(--accent); background: rgba(53,208,216,.12); }

/* ---------- Type ---------- */

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.15rem); }
h3 { font-size: 1.18rem; letter-spacing: -.005em; }
p  { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.lede { font-size: clamp(1.05rem, 2.1vw, 1.24rem); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

section { padding-block: clamp(52px, 8vw, 88px); }
section > .wrap > h2 { margin-bottom: .35em; }
.section-intro { color: var(--muted); max-width: 64ch; margin-bottom: 2.2em; }

hr.rule {
  border: 0; height: 1px; margin: 0;
  background: linear-gradient(90deg, transparent, var(--border) 22%, var(--border) 78%, transparent);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px;
  font-size: 15px; font-weight: 650; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .16s var(--ease), background .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #04141a; }
.btn-primary:hover { background: #55e2e9; color: #04141a; }
.btn-ghost { border-color: var(--border); color: var(--text); background: rgba(19,42,56,.5); }
.btn-ghost:hover { border-color: var(--accent-dim); background: rgba(53,208,216,.1); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(19,42,56,.55);
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brass); box-shadow: 0 0 9px var(--brass);
}

/* ---------- Cards ---------- */

.card {
  background: linear-gradient(160deg, var(--surface) 0%, rgba(9,22,31,.85) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.feature h3 { display: flex; align-items: center; gap: 10px; margin-bottom: .45em; }
.feature .glyph {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; font-size: 15px;
  background: rgba(53,208,216,.12); border: 1px solid rgba(53,208,216,.25);
}
.feature p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ---------- Home hero ---------- */

.hero { padding-block: clamp(58px, 10vw, 108px) clamp(40px, 6vw, 70px); }
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: .2em; }

/* Game showcase card on the home page */
.showcase {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.85fr);
  gap: clamp(24px, 4vw, 46px); align-items: center;
  background: linear-gradient(150deg, #102634 0%, #0a1721 62%, #071119 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(26px, 4vw, 44px);
  overflow: hidden; position: relative;
}
.showcase::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 260px at 88% 8%, rgba(53,208,216,.1), transparent 70%);
}
.showcase-body { position: relative; z-index: 1; min-width: 0; }
.showcase-art { position: relative; z-index: 1; display: flex; justify-content: center; }
.showcase-art img {
  width: min(280px, 78%); border-radius: 24px;
  border: 1px solid rgba(53,208,216,.2);
  box-shadow: 0 26px 60px -22px rgba(0,0,0,.85), 0 0 0 1px rgba(0,0,0,.4);
}
.showcase h2 { margin-bottom: .28em; }
.showcase .tagline { color: var(--accent); font-weight: 600; margin-bottom: .85em; }
@media (max-width: 780px) {
  .showcase { grid-template-columns: 1fr; text-align: left; }
  .showcase-art { order: -1; }
  .showcase-art img { width: min(190px, 55%); }
}

/* ---------- Game page hero ---------- */

.game-hero { padding-block: clamp(48px, 7vw, 84px) clamp(30px, 4vw, 46px); }
.game-hero-inner {
  display: grid; grid-template-columns: auto minmax(0,1fr);
  gap: clamp(20px, 3.5vw, 36px); align-items: center;
}
.game-hero-icon {
  width: clamp(96px, 15vw, 148px); border-radius: 24px;
  border: 1px solid rgba(53,208,216,.22);
  box-shadow: 0 22px 48px -18px rgba(0,0,0,.85);
}
.game-hero h1 { margin-bottom: .18em; }
.game-hero .tagline {
  color: var(--accent); font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  font-weight: 600; margin-bottom: .7em;
}
@media (max-width: 620px) {
  .game-hero-inner { grid-template-columns: 1fr; }
}

.platforms {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  color: var(--faint); font-size: 14px; font-weight: 500;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border);
}

/* ---------- Screenshot gallery ---------- */

.shots {
  display: flex; gap: 16px; overflow-x: auto; padding: 6px 22px 22px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin; scrollbar-color: var(--border-lit) transparent;
}
.shots::-webkit-scrollbar { height: 9px; }
.shots::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.shots figure { margin: 0; flex: none; scroll-snap-align: center; }
.shots img {
  border-radius: 16px; border: 1px solid var(--border);
  box-shadow: 0 18px 40px -20px rgba(0,0,0,.9);
  background: #060d13;
}
.shots.phone img { width: 236px; }
.shots.tablet img { width: 400px; }
/* On a phone, a 400px-wide tablet shot can't be seen whole — shrink both so at
   least one full screenshot fits on screen at a time. */
@media (max-width: 520px) {
  .shots.phone img  { width: 200px; }
  .shots.tablet img { width: 290px; }
}
.shots figcaption {
  margin-top: 10px; text-align: center;
  font-size: 13px; color: var(--faint);
}
.shots-label {
  font-size: 12px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--faint);
  margin: 0 0 12px; padding-inline: 22px;
}
.bleed { margin-inline: calc(50% - 50vw); }
.bleed > * { max-width: var(--maxw); margin-inline: auto; }

/* ---------- How to play ---------- */

/* Four cards — two columns keeps them as a 2x2 block rather than 3 + an orphan. */
.howto { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.howto .card h3 { color: var(--text); }
.howto ul { margin: 0; padding-left: 1.15em; color: var(--muted); }
.howto li { margin-bottom: .5em; }
.howto li:last-child { margin-bottom: 0; }
.howto strong { color: var(--text); font-weight: 650; }

/* Key / button glyphs */
kbd {
  display: inline-block; min-width: 1.75em; text-align: center;
  padding: 2px 7px; margin: 0 1px;
  font: 600 .8em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 6px; vertical-align: baseline;
}

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%; border-collapse: collapse; font-size: .95rem;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
caption {
  text-align: left; color: var(--faint); font-size: .85rem;
  padding-bottom: 10px;
}
th, td { padding: 11px 15px; text-align: left; border-bottom: 1px solid var(--border); }
thead th {
  background: var(--surface-2); color: var(--text);
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: rgba(19,42,56,.28); }
td .name { color: var(--text); font-weight: 600; }

/* ---------- Regions ---------- */

.regions { display: grid; gap: 12px; }
.region {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto;
  gap: 18px; align-items: center;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface), rgba(9,22,31,.6));
  padding: 16px 20px;
}
.region .depth {
  font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .06em; color: var(--accent);
  background: rgba(53,208,216,.1); border: 1px solid rgba(53,208,216,.22);
  padding: 8px 11px; border-radius: 8px; white-space: nowrap;
}
.region h3 { margin: 0 0 2px; font-size: 1.05rem; }
.region .boss { color: var(--muted); font-size: .9rem; }
.region .boss b { color: var(--brass); font-weight: 600; }
@media (max-width: 620px) {
  .region { grid-template-columns: auto minmax(0,1fr); }
}

/* ---------- Achievements ---------- */

.badges {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
}
.badges figure { margin: 0; text-align: center; }
.badges img {
  width: 100%; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
}
.badges figcaption { margin-top: 7px; font-size: 11.5px; color: var(--faint); line-height: 1.35; }

/* ---------- FAQ ---------- */

.faq { display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
  transition: border-color .2s;
}
.faq details[open] { border-color: var(--accent-dim); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 16px 52px 16px 20px; position: relative;
  font-weight: 600; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%); font-size: 21px; font-weight: 400;
  color: var(--accent); line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { background: rgba(53,208,216,.05); }
.faq .answer { padding: 0 20px 18px; color: var(--muted); }
.faq .answer > :first-child { margin-top: 0; }

/* ---------- Legal / prose pages ---------- */

.prose { max-width: 74ch; }
.prose h2 { margin-top: 1.9em; font-size: 1.42rem; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; color: var(--muted); }
.prose li { margin-bottom: .5em; }
.prose p { color: var(--muted); }
.prose strong { color: var(--text); }
.doc-meta {
  color: var(--faint); font-size: .9rem;
  border-left: 2px solid var(--border); padding-left: 14px; margin-bottom: 2.4em;
}
.callout {
  border: 1px solid var(--accent-dim); border-left-width: 3px;
  background: rgba(53,208,216,.07);
  border-radius: var(--radius-sm); padding: 16px 20px; margin: 1.6em 0;
}
.callout p { color: var(--text); }

/* ---------- CTA strip ---------- */

.cta {
  text-align: center;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(11,30,42,.6));
}
.cta h2 { margin-bottom: .3em; }
.cta .lede { margin-inline: auto; margin-bottom: 1.6em; }
.cta .btn-row { justify-content: center; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(4,9,14,.55);
  padding-block: 44px 36px;
  font-size: 14.5px;
}
.footer-grid {
  display: grid; gap: 30px;
  grid-template-columns: minmax(0,1.4fr) repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 32px;
}
.footer-grid h4 {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 12px; font-weight: 700;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); }
.footer-blurb { color: var(--faint); max-width: 34ch; margin-top: 12px; font-size: 14px; }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 12px 24px;
  justify-content: space-between; color: var(--faint); font-size: 13.5px;
}
.footer-bottom p { margin: 0; }
