/* 42Note website: one groovy page. Palette and type from the app. */

@font-face { font-family: "Urbanist"; src: url("/fonts/Urbanist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --desk: #0d0b0a;
  --brown: #2a1b13;
  --text: #f4f1ea;
  --muted: #a8a39a;
  --secondary: #c9c4ba;
  --hairline: rgba(255, 255, 255, 0.12);
  --cream: #f2e3c2;
  --mustard: #c9a63a;
  --accent: #e8792a;
  --accent-soft: #f7b27e;
  --rust: #a8442c;
  --plum: #3d1f3a;
  --gold-bright: #e6c77a;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Urbanist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 56px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(120% 80% at 50% 0%, #3d2518 0%, #1c130e 50%, var(--desk) 100%) var(--desk);
  color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--accent-soft); text-underline-offset: 3px; }
a:hover { color: var(--gold-bright); }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; border-radius: 6px; }
main { flex: 1; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- sticky header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(13, 11, 10, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 19px; }
.brand:hover { color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 26px); }
.nav a { color: var(--secondary); text-decoration: none; font-size: 15px; font-weight: 600; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav .pill { background: var(--accent); color: #241208; padding: 7px 16px; border-radius: 999px; }
.nav .pill:hover { background: var(--accent-soft); color: #241208; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: clamp(18px, 3vh, 40px) 0 0; position: relative; overflow: hidden; }
.app-icon { width: clamp(60px, 9vh, 88px); height: auto; margin: 0 auto 14px; border-radius: 22.5%; box-shadow: 0 18px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.06); }
.kicker { font-weight: 600; font-size: 17px; letter-spacing: 0; color: var(--gold-bright); margin: 0 0 4px; }
.kicker-sub { color: var(--accent-soft); font-weight: 500; font-size: 15px; margin: 0 0 16px; }
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 6vw, 68px); line-height: 1.05; margin: 0; letter-spacing: -0.02em; }
h1 em { font-style: normal; color: var(--accent); }
.tagline { color: var(--secondary); font-size: clamp(16px, 1.8vw, 19px); margin: 12px auto 20px; max-width: 30em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; position: relative; z-index: 2; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; border: 1px solid transparent;
}
.btn-primary { background: var(--cream); color: var(--brown); }
.btn-primary:hover { background: #fff6e2; color: var(--brown); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: var(--secondary); border-color: var(--hairline); }
.btn[aria-disabled="true"] { cursor: default; }

/* ---------- the '70s rainbow behind the devices ---------- */
.stage {
  --fw: max(min(560px, calc(100vw - 2 * var(--gutter))), min(1060px, calc(100vw - 2 * var(--gutter)), calc((100svh - 430px) * 1.9)));
  position: relative; margin-top: clamp(8px, 2vh, 20px); padding-top: calc(var(--fw) * 0.11);
}
.rainbow {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: calc(var(--fw) * 1.25); aspect-ratio: 2 / 1;
  z-index: 0; pointer-events: none; opacity: 0.92;
  background: radial-gradient(circle farthest-side at 50% 100%,
    transparent 0 50%,
    var(--plum) 50% 60%,
    var(--rust) 60% 70%,
    var(--accent) 70% 80%,
    var(--mustard) 80% 90%,
    var(--cream) 90% 100%,
    transparent 100%);
}

/* ---------- overlapping device family ---------- */
.family { position: relative; z-index: 1; width: var(--fw); margin: 0 auto; aspect-ratio: 1060 / 560; }
.device { container-type: inline-size; position: absolute; margin: 0; }
.shell { position: relative; }
.screen { position: relative; overflow: hidden; background: #000; }
.screen img { width: 100%; height: 100%; object-fit: cover; }

/* iPad at the back, centred */
.device.ipad { width: 62%; left: 19%; top: 0; z-index: 1; }
.ipad .shell {
  padding: 2.4cqw; border-radius: 5.2cqw; background: #111;
  box-shadow: 0 0 0 0.45cqw #6c6f73, 0 0 0 0.65cqw #2a2b2d, 0 40px 90px rgba(0,0,0,0.6);
}
.ipad .screen { aspect-ratio: 2752 / 2064; border-radius: 3cqw; }
.ipad .cam { position: absolute; top: 0.95cqw; left: 50%; width: 0.9cqw; height: 0.9cqw; margin-left: -0.45cqw; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #3a4660, #07080b 70%); }

/* Duo, unfolded, in front on the left */
.device.duo { width: 40%; left: 0; bottom: 0; z-index: 2; }
.duo .shell {
  padding: 2.2cqw; border-radius: 5.6cqw; background: #070707;
  box-shadow: 0 0 0 0.6cqw #85878a, 0 0 0 0.85cqw #333436, 0 30px 70px rgba(0,0,0,0.65);
}
.duo .screen { aspect-ratio: 2853 / 2007; border-radius: 3.6cqw; }
.duo .screen::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3cqw; margin-left: -1.5cqw; pointer-events: none;
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.10) 40%, rgba(255,255,255,0.10) 50%, rgba(0,0,0,0.10) 60%, transparent);
}
.duo .cam { position: absolute; top: 3.4cqw; right: 6cqw; width: 1.6cqw; height: 1.6cqw; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #3a4660, #050608 70%); z-index: 2; }

/* iPhone 18, in front on the right */
.device.iphone { width: 17%; right: 3%; bottom: 0; z-index: 3; }
.iphone .shell {
  padding: 3.2cqw; border-radius: 17cqw; background: #050505;
  box-shadow: 0 0 0 1.1cqw #8b8d90, 0 0 0 1.5cqw #3b3c3e, 0 30px 60px rgba(0,0,0,0.65);
}
.iphone .screen { aspect-ratio: 1320 / 2868; border-radius: 14cqw; }
.iphone .island { position: absolute; top: 5.6cqw; left: 50%; width: 30cqw; height: 8.6cqw; margin-left: -15cqw; border-radius: 99px; background: #000; z-index: 2; }
.iphone .btn-side { position: absolute; width: 1.4cqw; border-radius: 1cqw; background: #7c7e81; }
.iphone .b1 { left: -2.8cqw; top: 22%; height: 7%; }
.iphone .b2 { left: -2.8cqw; top: 32%; height: 11%; }
.iphone .b3 { right: -2.8cqw; top: 28%; height: 15%; }

.band { position: relative; z-index: 2; height: 40px; background: linear-gradient(to bottom, var(--cream) 0 20%, var(--mustard) 20% 40%, var(--accent) 40% 60%, var(--rust) 60% 80%, var(--plum) 80% 100%); }

@media (max-width: 640px) {
  .brand span { display: none; }
  .nav { gap: 14px; }
  .rainbow { width: 135vw; }
  .family { aspect-ratio: 1060 / 640; }
  .device.ipad { width: 76%; left: 12%; }
  .device.duo { width: 50%; left: -2%; }
  .device.iphone { width: 22%; right: 0; }
  .band { height: 28px; }
  .btn { padding: 0 18px; }
}

/* ---------- wide screens: text beside the graphic ---------- */
@media (min-width: 900px) {
  .hero { text-align: left; padding: 0; }
  .hero-grid {
    display: grid; grid-template-columns: minmax(340px, 0.8fr) 1.2fr; gap: clamp(16px, 3vw, 48px);
    align-items: center; min-height: min(calc(100svh - 62px - 40px), 760px); padding-top: clamp(16px, 3vh, 40px);
  }
  .hero-copy { padding-bottom: clamp(24px, 6vh, 80px); position: relative; z-index: 2; }
  .app-icon { margin: 0 0 18px; }
  h1 { font-size: clamp(40px, 3.9vw, 58px); }
  .tagline { margin: 16px 0 26px; max-width: 26em; }
  .cta-row { justify-content: flex-start; }
  .stage { align-self: end; margin: 0 calc(-1 * var(--gutter)) 0 0; padding-top: 12%; }
  .family { width: 100%; }
  .rainbow { width: 122%; }
}

/* ---------- simple pages ---------- */
.doc { padding: clamp(28px, 6vw, 64px) 0 clamp(48px, 8vw, 90px); }
.doc .wrap { max-width: 700px; }
.doc h1 { font-size: clamp(32px, 4.4vw, 44px); }
.doc .updated { color: var(--muted); font-size: 15px; margin: 10px 0 28px; }
.doc h2 { font-family: var(--sans); font-size: 19px; font-weight: 700; margin: 30px 0 6px; }
.doc p, .doc li { color: var(--secondary); }
.doc p { margin: 0 0 12px; }
.doc strong { color: var(--text); }
.todo { background: rgba(232, 121, 42, 0.18); outline: 1px dashed var(--accent); border-radius: 4px; padding: 0 4px; }

/* ---------- footer ---------- */
.site-footer { padding: 26px 0 34px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--secondary); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer .maker a { color: var(--text); font-weight: 600; }
