/* 96One — shared site chrome.
 *
 * Palette and display type are the App Store artwork's own — see
 * stores/app-store/previews/96one-preview-template.html. Everything every page
 * has in common lives here: the standard header (brand mark left, name centre,
 * App Store badge right), the footer, and the ground they sit on. Page-specific
 * layout stays inline in the page that needs it.
 *
 * StatefulStack.DeployWebsite deploys this folder verbatim (WebStack is dead
 * code — commented out in Program.cs), so a new page needs nothing but
 * <link rel="stylesheet" href="site.css"> and the header markup below. */

:root {
  --navy-lift: #124A93;
  --navy:      #0A346D;
  --navy-deep: #062350;
  --gold:      #C6A15B;
  --gold-soft: #D8BE86;
  --cream:     #EDE6D6;
  --paper:     #FBF8F1;
  --ink:       #14233F;

  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Montserrat', sans-serif;
  /* Same gradient the navy App Store frames are built on. */
  background: radial-gradient(120% 80% at 50% 0%, var(--navy-lift) 0%, var(--navy) 44%, var(--navy-deep) 100%)
              var(--navy-deep) fixed;
  color: var(--cream);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

::selection {
  background: var(--gold);
  color: var(--navy-deep);
}

/* ---------- Standard header ---------- */

.masthead {
  position: relative; /* anchors the mark and badge to the header's corners */
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
}

/* Decorative — the name is set beside it in text, so it carries an empty alt
   rather than repeating itself to a screen reader.

   Sized against the type block beside it: eyebrow top to wordmark baseline is
   70px, but open gold line art carries far less optical mass than a solid white
   badge, so it takes ~80px to weigh the same. Both flankers are centred on that
   block's midline, which is what actually reads as symmetry. */
.brand-mark {
  position: absolute;
  top: -5px;
  left: 0;
  height: 80px;
  width: auto;
}

.masthead .store-badge {
  position: absolute;
  top: 12px; /* centres the badge on the type block's midline */
  right: 0;
}

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.wordmark {
  display: inline-block;
  margin-top: 10px;
  font-size: clamp(32px, 4.6vw, 46px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--paper);
}

/* On pages other than the landing page the name is the way home. */
a.wordmark {
  text-decoration: none;
  transition: color 0.3s ease;
}

a.wordmark:hover {
  color: var(--gold-soft);
}

/* Hairline under the name — the one piece of ornament on the page. */
.rule {
  width: 56px;
  height: 1px;
  margin: 18px auto 16px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ---------- App Store badge ---------- */

.store-badge {
  display: inline-block;
  line-height: 0; /* no descender gap under the badge artwork */
  transition: transform 0.3s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
}

.store-badge:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
  border-radius: 8px;
}

/* Apple ships the badge black-on-white content; on a dark ground the white
   badge is the correct one, and inverting the official artwork yields exactly
   that without redrawing it. */
.store-badge img {
  display: block;
  height: 46px; /* Apple's badge artwork; width follows its aspect ratio */
  width: auto;
  filter: invert(1);
}

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

.footer {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 16px 26px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 22px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(237, 230, 214, 0.62);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.01em;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--gold-soft);
}

.footer-links a:focus-visible,
a.wordmark:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 3px;
}

.contact-icon {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
}

/* No room for the badge beside the masthead — put it back in the flow. */
@media (max-width: 820px) {
  .masthead .store-badge {
    position: static;
    margin-top: 16px;
  }

  .brand-mark {
    height: 58px; /* the wordmark shrinks here too, so the mark follows it down */
    top: -1px;
  }
}

@media (max-width: 480px) {
  .footer {
    padding-bottom: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .store-badge,
  .footer-links a,
  a.wordmark {
    transition: none;
  }
}
