/* ============================================================
   NI Apps — Days Out NI palette + typography
   Palette source: APPS/TEMPLATES/palette.css
   Type: Poppins (headings) + Inter (body) — same pairing as daysoutni.com
   ============================================================ */

:root {
  /* Core brand */
  --sky:        #5FB1DD;
  --sky-deep:   #3F8FCB;
  --sun:        #FFCE3D;
  --sun-edge:   #F0A815;
  --deep:       #1F5E8A;
  --brand:      #2F7FB6;

  /* Surfaces */
  --paper:      #F6F8FB;
  --panel:      #FFFFFF;
  --ink:        #16344B;
  --ink-soft:   #4A6B82;
  --hair:       #E3ECF4;

  --g-sky:  linear-gradient(180deg, var(--sky) 0%, var(--sky-deep) 100%);
  --g-sun:  linear-gradient(135deg, var(--sun) 0%, var(--sun-edge) 100%);

  --radius:     20px;
  --radius-sm:  13px;
  --shadow:     0 10px 34px rgba(31, 94, 138, .10);
  --shadow-lg:  0 20px 54px rgba(31, 94, 138, .16);
  --spring:     cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Per-card accent — overridden inline on each tile */
  --accent: var(--brand);
}

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

/* Any element given an explicit display (.btn is inline-flex) ignores the
   plain [hidden] attribute, so a "hidden" button renders and does nothing.
   This has bitten more than one app here — keep the !important. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  /* A soft sun low on the page so the paper isn't flat white */
  background-image:
    radial-gradient(900px 520px at 80% -6%, rgba(255,206,61,.22), transparent 62%),
    radial-gradient(760px 480px at 8% 8%, rgba(95,177,221,.20), transparent 60%);
  background-attachment: fixed;
  line-height: 1.6;
  font-size: 17px;
  padding-bottom: 40px;
}

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 18px; }

/* ---------- Masthead ---------- */

.masthead {
  background: var(--g-sky);
  /* Paints the strip behind the iPhone clock on a home-screened PWA */
  padding: calc(env(safe-area-inset-top) + 26px) 0 24px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(31,94,138,.20);
  position: relative;
  overflow: hidden;
}
.masthead::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--g-sun);
}

.wordmark {
  font-family: Poppins, Inter, sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 12vw, 62px);
  line-height: 1;
  letter-spacing: -.02em;
  color: #fff;
  text-shadow: 0 3px 18px rgba(20,60,90,.30);
}
.wordmark .gold { color: var(--sun); }

.rule {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}
.rule span {
  height: 2px;
  width: clamp(18px, 8vw, 54px);
  background: var(--sun);
  border-radius: 2px;
  opacity: .9;
}
.rule p {
  font-family: Poppins, Inter, sans-serif;
  font-weight: 600;
  font-size: clamp(13px, 3.6vw, 16px);
  color: #fff;
  letter-spacing: .02em;
  white-space: nowrap;
}

/* ---------- Gradient outline (workspace house style) ---------- */

.grad-outline { position: relative; }
.grad-outline::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(150deg,
    var(--accent) 0%,
    color-mix(in srgb, var(--accent) 35%, var(--sun)) 48%,
    color-mix(in srgb, var(--accent) 45%, #ffffff) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

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

.card {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin: 20px 0;
}

h2 {
  font-family: Poppins, Inter, sans-serif;
  font-weight: 700;
  font-size: 21px;
  line-height: 1.28;
  letter-spacing: -.01em;
  color: var(--deep);
}

#app-list > .app:first-child { margin-top: 18px; }

/* ---------- Quick-pick shelf ---------- */

.shelf {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 20px;
}

.pick {
  background: var(--panel);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 11px 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  transition: transform .18s var(--spring), box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.pick:active { transform: scale(.94); }

.pick img {
  width: 100%;
  max-width: 58px;
  height: auto;
  aspect-ratio: 1;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(20,50,80,.20);
}

.pick-name {
  font-family: Poppins, Inter, sans-serif;
  font-weight: 700;
  font-size: 11.5px;
  line-height: 1.15;
  color: var(--deep);
  text-align: center;
  /* Names are short enough not to wrap; if one ever is, keep the tiles level. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.pick-get {
  font-family: Poppins, Inter, sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .04em;
  color: #fff;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--accent) 88%, #ffffff) 0%,
    var(--accent) 100%);
  border-radius: 999px;
  padding: 6px 0;
  width: 100%;
  text-align: center;
}

/* The whole tile is the tap target, so it has to clear 44px on its own —
   the Get pill is a label, not a separate button. */
@media (max-width: 359px) {
  .pick img { max-width: 48px; }
  .pick-name { font-size: 10.5px; }
  .pick-get { font-size: 11.5px; }
}

/* ---------- Notices ---------- */

.notice {
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-top: 20px;
}
.notice-warn {
  background: #FFF6DE;
  border: 2px solid var(--sun-edge);
  color: #6A4A05;
}
.notice-warn strong { display: block; font-size: 17px; margin-bottom: 6px; }
.notice-warn p { font-size: 15.5px; line-height: 1.55; }

/* ---------- App tiles ---------- */

.app {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 20px 0;
  overflow: hidden;
  position: relative;
}
.app.featured { box-shadow: var(--shadow-lg); }
.app { scroll-margin-top: 14px; }

.app-hero {
  display: block;
  width: 100%;
  height: auto;
  /* aspect-ratio is set inline per app — each hero keeps its own proportions
     so nothing gets cropped to fit a shared shape. */
  object-fit: cover;
  background: var(--sky-deep);
}

.app-body { padding: 0 20px 20px; }

/* The icon is pinned to the photo rather than sitting in the text flow. It used
   to be a flex row pulled up with a negative margin, but a title long enough to
   wrap (Conscious Parenting NI) then rose onto the photo and became unreadable. */
.app-shot { position: relative; line-height: 0; }

.app-icon {
  position: absolute;
  left: 20px;
  bottom: -30px;
  width: 76px;
  height: 76px;
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(20,50,80,.26);
  background: #fff;
  border: 3px solid #fff;
}
.featured .app-icon {
  width: 92px; height: 92px; border-radius: 21px; bottom: -34px;
}

.app-title { padding: 14px 0 0 100px; min-height: 62px; }
.featured .app-title { padding-left: 116px; min-height: 72px; }
.app-title h3 {
  font-family: Poppins, Inter, sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 6vw, 27px);
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--deep);
}
.badge {
  display: inline-block;
  font-family: Poppins, sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  background: var(--g-sun);
  color: #4A3200;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 7px;
}

.app-line {
  margin-top: 14px;
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 500;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  font-family: Poppins, Inter, sans-serif;
  font-weight: 700;
  font-size: 16px;
  border: 0;
  border-radius: 14px;
  padding: 14px 20px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  transition: transform .18s var(--spring), box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.96); }

.btn-primary {
  flex: 1 1 auto;
  color: #fff;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--accent) 88%, #ffffff) 0%,
    var(--accent) 100%);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 34%, transparent);
}

.actions .btn { flex: 1 1 100%; }

.btn-ghost {
  background: var(--panel);
  color: var(--deep);
  border: 2px solid var(--hair);
}

.btn-listen {
  background: #fff;
  color: var(--deep);
  border: 2px solid color-mix(in srgb, var(--accent) 40%, #ffffff);
  font-size: 15.5px;
  padding: 12px 18px;
  min-height: 48px;
  width: 100%;
  /* Long labels wrap; keep the text ranged left off the play dot rather than
     centring the second line under it. */
  justify-content: flex-start;
  text-align: left;
}
.btn-listen .dot {
  width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 50%;
  background: var(--g-sun);
  display: grid; place-items: center;
  font-size: 11px; color: #4A3200;
}

/* ---------- Audio player ---------- */

.audio { margin-top: 16px; }
.audio-bar {
  height: 5px;
  border-radius: 3px;
  background: var(--hair);
  margin-top: 10px;
  overflow: hidden;
  display: none;
}
.audio.playing .audio-bar { display: block; }
.audio-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--g-sun);
  border-radius: 3px;
}

/* ---------- Disclosure ---------- */

details.more {
  margin-top: 16px;
  border-top: 1px solid var(--hair);
  padding-top: 4px;
}
details.more > summary {
  list-style: none;
  cursor: pointer;
  font-family: Poppins, Inter, sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--brand);
  padding: 13px 0 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  -webkit-tap-highlight-color: transparent;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before {
  content: '';
  width: 9px; height: 9px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .25s var(--spring);
}
details.more[open] > summary::before { transform: rotate(-135deg) translateY(-2px); }

.app-lead { margin-top: 12px; }
.app-lead p:last-child { margin-bottom: 0; }

.prose p { margin: 0 0 14px; color: var(--ink-soft); font-size: 16.5px; line-height: 1.68; }
.prose p:last-child { margin-bottom: 4px; }
.prose b { color: var(--ink); font-weight: 600; }

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

.how { scroll-margin-top: 16px; }
.how-sub { margin-top: 8px; color: var(--ink-soft); font-size: 16px; }

.tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0 4px;
  background: var(--paper);
  padding: 6px;
  border-radius: 15px;
  border: 1px solid var(--hair);
}
.tab {
  flex: 1;
  font-family: Poppins, Inter, sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 6px;
  min-height: 48px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.tab[aria-selected="true"] {
  background: var(--panel);
  color: var(--deep);
  box-shadow: 0 3px 12px rgba(31,94,138,.14);
}

.tabpanel { padding-top: 6px; }
.panel-note { margin-top: 12px; font-size: 15px; color: var(--ink-soft); }

ol.steps { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: s; }
ol.steps li {
  counter-increment: s;
  position: relative;
  padding: 0 0 18px 46px;
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--ink-soft);
}
ol.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0; top: 1px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--g-sky);
  color: #fff;
  font-family: Poppins, sans-serif;
  font-weight: 700;
  font-size: 15px;
  display: grid;
  place-items: center;
}
ol.steps li:last-child { padding-bottom: 6px; }
ol.steps b { color: var(--ink); font-weight: 600; }
.hint { display: block; margin-top: 4px; font-size: 15px; opacity: .82; }

.done {
  margin-top: 14px;
  background: #EAF6EE;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-weight: 600;
  color: #17604A;
  font-size: 16px;
}

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

.foot {
  text-align: center;
  padding: 34px 8px 10px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}
.foot .ver { margin-top: 10px; font-size: 13px; opacity: .6; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Share button + QR sheet ---------- */

/* Sun-yellow round icons, lifted straight from the daysoutni.com header —
   small enough to flank the centred wordmark without crowding it. Contact on
   the left, share on the right, exactly as Days Out arranges its two. */
.hdr-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #F4B82A;
  color: #1A2233;
  box-shadow: 0 2px 6px rgba(212, 154, 15, .30);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .18s var(--spring), background .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.hdr-btn svg { display: block; }
.hdr-btn:active { transform: translateY(-50%) scale(.94); background: #FFCB4F; }

.contact-btn { left: 18px; }
.share-btn   { right: 18px; }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}
.sheet[hidden] { display: none; }

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 44, 68, .55);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
  animation: fade .2s ease;
}

.sheet-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: 100%;
  overflow-y: auto;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px 22px 22px;
  text-align: center;
  --accent: var(--brand);
  animation: pop .28s var(--spring);
}

@keyframes fade { from { opacity: 0 } }
@keyframes pop  { from { opacity: 0; transform: translateY(14px) scale(.96) } }

.sheet-x {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}

.sheet-card h2 { font-size: 20px; padding: 0 26px; }
.sheet-sub { margin-top: 7px; font-size: 15.5px; color: var(--ink-soft); }

.qr-wrap {
  margin: 18px auto 0;
  width: min(268px, 78vw);
  padding: 12px;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 2px solid var(--hair);
}
.qr-wrap svg { display: block; width: 100%; height: auto; }

.sheet-url {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--deep);
  word-break: break-all;
  line-height: 1.4;
}

.sheet-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.sheet-actions .btn { flex: 1 1 100%; }

/* Stops the page scrolling behind the sheet on iOS. */
body.sheet-open { overflow: hidden; }

/* ---------- Contact sheet ---------- */

.contact-address {
  display: block;
  margin: 18px 0 2px;
  font-family: Poppins, Inter, sans-serif;
  font-weight: 800;
  font-size: clamp(19px, 5.6vw, 24px);
  letter-spacing: -.01em;
  color: var(--deep);
  text-decoration: none;
  word-break: break-all;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 2px solid var(--hair);
  min-height: 56px;
}
.contact-address:active { background: #EDF3F9; }

.sheet-note {
  margin-top: 9px;
  font-size: 14.5px;
  color: var(--ink-soft);
}
