/* ==========================================================================
   soaringplatypus.com — site styles
   Tokens are derived from the seal: ink navy (#112844, sampled from the
   logo), paper white, a pale sky tint, an ivory tint for the studio wing,
   and one warm accent taken from the platypus's bill.
   ========================================================================== */

:root {
  --ink: #112844;
  --ink-2: #3b4d67;
  --ink-3: #5f6e84;
  --ink-hover: #1b3a60;
  --paper: #ffffff;
  --sky: #eef3f8;
  --ivory: #f8f4ec;
  --bill: #e5a13c;
  --bill-ink: #9a5f0b;
  --line: rgba(17, 40, 68, 0.16);
  --font-display: "DM Serif Display", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --staff-gap: clamp(30px, 4.6vw, 52px);
  --radius: 16px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
}

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

a {
  color: var(--ink);
  text-decoration-color: var(--bill);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: var(--ink);
}

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

p {
  margin: 0 0 1em;
  max-width: 64ch;
}

p,
li {
  text-wrap: pretty;
}

/* room above an anchor target after a jump */
[id] {
  scroll-margin-top: 1.5rem;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.012em;
}

h2 {
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}

.eyebrow {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bill-ink);
  margin: 0 0 0.85rem;
}

.lede {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 34em;
}

.meta {
  color: var(--ink-3);
  font-size: 0.9375rem;
}

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

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

.site-header {
  padding-block: 1.1rem;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -0.005em;
}

.brand img {
  width: 44px;
  height: 44px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.site-nav a {
  display: inline-block;
  text-decoration: none;
  font-weight: 500;
  padding-block: 0.3rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--bill);
}

/* --------------------------------------------------------------------------
   Hero: the seal sits on a staff like a whole note
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4.5rem);
}

.hero .wrap {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero__copy {
  position: relative;
  z-index: 1;
}

.hero__copy .lede {
  margin-top: 1.5rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 2rem;
}

.hero__figure {
  position: relative;
  display: grid;
  place-items: center;
  padding-block: 1.5rem;
}

.hero__staff {
  position: absolute;
  top: 50%;
  left: calc(-1 * var(--gutter));
  width: 100vw;
  height: calc(var(--staff-gap) * 4 + 2px);
  transform: translateY(-50%);
  transform-origin: left center;
  background: repeating-linear-gradient(
    to bottom,
    var(--line) 0 2px,
    transparent 2px var(--staff-gap)
  );
  pointer-events: none;
  animation: staff-draw 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__seal {
  position: relative;
  z-index: 1;
  width: clamp(180px, 50vw, 400px);
  /* the PNG's interior is transparent: an opaque paper disc just inside the
     outer ring makes the seal occlude the staff like a note head */
  background: radial-gradient(closest-side, var(--paper) 92%, transparent 93%);
  animation: seal-land 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s both;
}

@keyframes staff-draw {
  from {
    transform: translateY(-50%) scaleX(0);
  }
  to {
    transform: translateY(-50%) scaleX(1);
  }
}

@keyframes seal-land {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 860px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 3rem;
  }

  .hero__figure {
    min-height: 420px;
    justify-items: end;
  }

  .hero__seal {
    width: min(360px, 82%);
  }

  /* the staff runs in from the copy column (fading in) and out to the
     viewport edge, so the seal sits on it rather than trailing lines */
  .hero__staff {
    left: -3rem;
    width: calc(100vw + 3rem);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 3rem);
    mask-image: linear-gradient(to right, transparent, #000 3rem);
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  background: var(--ink);
  color: #fff;
}

.btn--primary:hover {
  background: var(--ink-hover);
  border-color: var(--ink-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--sky);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.section--tint {
  background: var(--sky);
}

.section__head {
  max-width: 42rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__head .lede {
  margin-top: 1rem;
}

/* Two wings */

.wings {
  display: grid;
  gap: 1.25rem;
}

.wing {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border-radius: var(--radius);
}

.wing--studio {
  background: var(--ivory);
}

.wing--apps {
  background: var(--sky);
}

.wing .eyebrow {
  color: var(--ink-3);
}

.wing h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.wing ul {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--ink-2);
}

.wing li {
  margin-bottom: 0.35rem;
}

.wing p:last-child,
.wing ul:last-child {
  margin-bottom: 0;
}

@media (min-width: 760px) {
  .wings {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

/* App */

.app {
  display: grid;
  gap: 1.5rem 2.5rem;
  align-items: start;
}

/* grid children default to min-width:auto, which would let the facts grid
   below force this column wider than the phone viewport */
.app > * {
  min-width: 0;
}

.app__icon {
  width: 128px;
  height: 128px;
  border-radius: 22.37%;
  box-shadow: 0 8px 24px rgba(17, 40, 68, 0.18);
}

.app__status {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--bill);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.app__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 44rem;
}

.app__facts li {
  border-top: 2px solid var(--line);
  padding-top: 0.6rem;
}

.app__facts b {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.15rem;
}

.app__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.app__links a {
  font-weight: 500;
}

@media (min-width: 760px) {
  .app {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .app__icon {
    width: 160px;
    height: 160px;
  }

  .app__facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* About */

.about {
  display: grid;
  gap: 2rem;
}

.principles {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.principles li {
  position: relative;
  padding-left: 1.6rem;
  max-width: 60ch;
}

/* a hollow whole note as the bullet */
.principles li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.85rem;
  height: 0.62rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.principles b {
  font-weight: 700;
}

@media (min-width: 860px) {
  .about {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 3rem;
  }

  /* keep the question in view while the answer scrolls */
  .about > :first-child {
    position: sticky;
    top: 2rem;
    align-self: start;
  }
}

/* Contact */

.contact .lede {
  margin-top: 1rem;
}

.contact .email {
  display: inline-block;
  margin: 0.25rem 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1rem + 2.4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.3em;
  text-decoration-skip-ink: none;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Inner pages (support, privacy)
   -------------------------------------------------------------------------- */

.page-head {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.page-head .lede {
  margin-top: 1.25rem;
}

.page-head .meta {
  margin-top: 1rem;
}

.prose {
  max-width: 68ch;
  padding-block: 0.5rem clamp(3rem, 8vw, 6rem);
}

.prose h2 {
  font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.1rem);
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--line);
}

.prose h3 {
  margin: 1.75rem 0 0.5rem;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
  margin: 0 0 1em;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  margin: 1rem 0 1.5rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.6rem 0.75rem 0.6rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.prose th {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.prose td:first-child {
  font-weight: 700;
  width: 34%;
}

@media (min-width: 640px) {
  .prose td:first-child {
    width: auto;
    white-space: nowrap;
  }
}

.table-wrap {
  overflow-x: auto;
}

.note {
  background: var(--sky);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.note p:last-child {
  margin-bottom: 0;
}

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

.site-footer {
  background: var(--ink);
  color: #fff;
  padding-block: 3rem 2.5rem;
}

.site-footer a {
  color: #fff;
  text-decoration-color: var(--bill);
}

.site-footer a:hover {
  text-decoration-color: #fff;
}

.site-footer :focus-visible {
  outline-color: var(--bill);
}

.site-footer .wrap {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

.site-footer img {
  width: 76px;
  height: 76px;
}

.site-footer small {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: 52ch;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-nav a {
  font-weight: 500;
}

@media (min-width: 760px) {
  .site-footer .wrap {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 2.5rem;
  }
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.lost {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: 4rem;
}

.lost img {
  width: 160px;
  margin: 0 auto 1.5rem;
}

.lost p {
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__staff,
  .hero__seal {
    animation: none;
  }

  .btn {
    transition: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero__staff,
  .skip-link {
    display: none;
  }

  body {
    font-size: 11pt;
  }

  a {
    text-decoration: none;
  }
}
