/* Magnifica Labs: one stylesheet for the home page and the two long-form pages (/our-purpose, /code-of-conduct).
   Brand: anthracite, cream and copper. Ice blue marks developer tools, antique coral marks everyday apps.
   Serif for large headings, a system sans-serif for reading text. Nothing is loaded from other sites. */
:root {
  --bg: #181B20; --bg-edge: #111317;
  --text: #F1E6CB; --text-soft: rgba(241, 230, 203, 0.78);
  --copper: #D9A07E; --coral: #D08A7A; --ice: #BFD9F2;
  --rule: rgba(217, 160, 126, 0.35); --card: rgba(241, 230, 203, 0.04);
  --serif: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg-edge); scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: radial-gradient(ellipse at 50% 0%, var(--bg), var(--bg-edge) 70%) fixed; color: var(--text); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--coral); text-underline-offset: 3px; }
a:hover { color: var(--text); }
p { margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h2 { font-size: 40px; line-height: 1.15; margin: 0 0 22px; }
h3 { font-size: 22px; line-height: 1.25; margin: 0 0 6px; }
.eyebrow { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--copper); margin: 0 0 14px; }
.more { display: inline-flex; gap: 8px; align-items: center; font-size: 15px; letter-spacing: 0.02em; text-decoration: none; }
.more span { transition: transform .2s; }
.more:hover span { transform: translateX(4px); }

/* Top bar: the brand on the left, one link per home section on the right; the current section is underlined. */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; background: rgba(17, 19, 23, 0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.bar.scrolled { border-bottom-color: var(--rule); }
.bar .brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 18px var(--serif); }
.bar .brand img { width: 30px; height: 30px; }
.bar nav { display: flex; gap: 22px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }
.bar nav a { color: var(--copper); text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; }
.bar nav a:hover, .bar nav a[aria-current="true"] { color: var(--text); border-bottom-color: var(--coral); }

/* Home: each part of the story is about one screen; the page snaps gently from one to the next. */
.home { scroll-snap-type: y proximity; }
.panel { min-height: 100vh; min-height: 100svh; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: center; padding: 96px 22px 64px; }
.inner { width: 100%; max-width: 780px; margin: 0 auto; }
.inner.wide { max-width: 1060px; }
.lede { font-size: 20px; color: var(--text); }

.hero { text-align: center; }
.hero img { width: 148px; height: 148px; }
.hero h1 { font-size: 30px; letter-spacing: 0.06em; margin: 22px 0 0; color: var(--copper); }
.hero .tagline { font: 64px/1.08 var(--serif); margin: 18px 0 0; }
.hero .tagline span { display: block; color: var(--coral); }
.cue { display: inline-block; margin-top: 56px; color: var(--copper); text-decoration: none; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; }
.cue::after { content: ""; display: block; width: 1px; height: 42px; margin: 12px auto 0; background: linear-gradient(var(--copper), transparent); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(8px); opacity: 1; } }

/* About: a short introduction, then the mission and the vision side by side, then the way to the full text. */
.purpose { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 30px 0 0; padding: 26px 0 8px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.purpose h3::before { content: ""; display: block; width: 30px; height: 2px; margin-bottom: 14px; background: var(--coral); }
.purpose .vision h3::before { background: var(--ice); }
.purpose p { color: var(--text-soft); font-size: 16px; }
.about .more, .studio .more { margin-top: 22px; }

/* What we make: two groups of product cards, ice blue for developer tools and antique coral for everyday apps. */
.group { --tone: var(--ice); margin-top: 40px; }
.group.everyday { --tone: var(--coral); }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 18px; padding-left: 14px; border-left: 2px solid var(--tone); }
.group-head h3 { color: var(--tone); margin: 0; }
.group-head p { margin: 0; flex: 1 1 340px; color: var(--text-soft); font-size: 15px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule); border-top: 2px solid var(--tone); border-radius: 12px; overflow: hidden; }
.shot { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: #0d0f12; border-bottom: 1px solid var(--rule); }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.shot.phone { position: relative; background: linear-gradient(180deg, rgba(208, 138, 122, 0.22), rgba(208, 138, 122, 0.04)); }
/* A phone screenshot: the top of the screen, centred, rising from the bottom edge of the frame. */
.shot.phone img { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 46%; height: auto; border-radius: 14px 14px 0 0; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); }
.shot.term { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 22px; font: 14px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--text); }
.shot.term span { color: var(--tone); }
.shot.term .note { color: var(--text-soft); }
.card-body { flex: 1; padding: 16px 18px 4px; }
.card-body p { color: var(--text-soft); font-size: 15px; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-decoration-color: var(--tone); }
.status { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 8px !important; font-size: 12px !important; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tone) !important; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #7FC79A; box-shadow: 0 0 0 3px rgba(127, 199, 154, 0.18); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 6px 18px 18px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--tone); border-radius: 999px; color: var(--text); font-size: 14px; text-decoration: none; transition: background .2s, color .2s; }
.btn:hover { background: var(--tone); color: var(--bg-edge); }
.btn.primary { background: var(--tone); color: var(--bg-edge); }
.btn.primary:hover { background: transparent; color: var(--text); }

.studio p:not(.eyebrow) { color: var(--text-soft); }
.studio .lede { color: var(--text); }

/* Contact sits at the end of the page, so it takes only the room it needs. */
.panel.contact { min-height: auto; justify-content: flex-start; padding-top: 120px; padding-bottom: 36px; }
.contact a.big { font: 26px var(--serif); }
.contact ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 20px 0 0; }

footer { text-align: center; color: var(--copper); font-size: 14px; padding: 18px 22px 32px; border-top: 1px solid rgba(217, 160, 126, 0.15); }
footer nav { display: flex; justify-content: center; gap: 22px; margin-bottom: 8px; }
footer nav a { color: var(--copper); text-decoration: none; }
footer nav a:hover { color: var(--text); text-decoration: underline; }
footer p { margin: 0; }

/* Long-form pages: one readable column. */
.doc { max-width: 720px; margin: 0 auto; padding: 120px 22px 56px; }
.doc h1 { font-size: 48px; line-height: 1.1; margin: 0 0 16px; }
.doc .subtitle { font: 24px/1.35 var(--serif); color: var(--coral); margin-bottom: 30px; }
.doc p { color: var(--text-soft); }
.doc section { margin-top: 52px; scroll-margin-top: 80px; }
.doc h2 { font-size: 32px; margin-bottom: 18px; }
.doc .statement { font: 22px/1.45 var(--serif); color: var(--text); margin: 0 0 22px; padding-left: 18px; border-left: 2px solid var(--coral); }
.doc #vision .statement { border-left-color: var(--ice); }
.doc .closing { color: var(--text); font-family: var(--serif); font-size: 20px; }
.toc { margin: 34px 0 0; padding: 20px 22px; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; }
.toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; font-size: 15px; }
.toc li { margin: 0 0 6px; break-inside: avoid; }
.toc a { color: var(--text-soft); text-decoration: none; }
.toc a:hover { color: var(--text); text-decoration: underline; }
.principle h2 { display: flex; gap: 14px; align-items: baseline; font-size: 28px; }
.principle h2 .num { font-size: 18px; color: var(--copper); min-width: 1.6em; }
.commitment { padding: 28px 28px 14px; background: var(--card); border: 1px solid var(--rule); border-top: 2px solid var(--coral); border-radius: 12px; }
.next { display: block; margin-top: 52px; padding: 22px 24px; border: 1px solid var(--rule); border-radius: 12px; text-decoration: none; color: var(--text); background: var(--card); }
.next:hover { border-color: var(--coral); color: var(--text); }
.next small { display: block; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--copper); margin-bottom: 6px; }
.next strong { font: 400 24px var(--serif); }
.next span { color: var(--coral); margin-left: 6px; }
.back { display: inline-block; margin-top: 28px; font-size: 15px; }

/* Home sections fade up as they arrive. Without JavaScript, or with reduced motion, everything is simply visible. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .home { scroll-snap-type: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .cue::after { animation: none; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .bar { padding: 12px 16px; }
  .bar .brand span { display: none; }
  .bar nav { gap: 14px; font-size: 12px; letter-spacing: 0.04em; }
  .panel { padding: 88px 16px 48px; }
  .panel.contact { padding-top: 96px; }
  .hero .tagline { font-size: 44px; }
  h2 { font-size: 32px; }
  .purpose { grid-template-columns: 1fr; gap: 10px; }
  .cards { grid-template-columns: 1fr; }
  .doc { padding: 96px 16px 40px; }
  .doc h1 { font-size: 36px; }
  .doc .subtitle { font-size: 20px; }
  .doc h2, .principle h2 { font-size: 26px; }
  .toc ol { columns: 1; }
  .commitment { padding: 22px 18px 8px; }
}
