/* Omniday landing page styles, shared by index.html and 404.html.
   Mobile first: base rules target small screens, wider layouts are added at 640px and 1024px. */

/* ---------- Font ---------- */

/* Inter variable (weight 100–900), self-hosted, SIL OFL 1.1.
   Fallback only: Apple devices render SF Pro via -apple-system and never fetch this file. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;

  --bg: #eef2f7;           /* matches <meta name="theme-color"> */
  --ink: #1d1d1f;
  --body: #515154;         /* on background and cards (≥ 4.5:1) */
  --muted: #424245;        /* small text on the landscape */
  --rule: #e8e8ed;
  --neutral-bg: #f0f0f3;
  --shade: 20, 20, 30;     /* RGB of the shadow / hairline color */

  /* Domain colors */
  --work: #D92D40;     --work-bg: #FFF0F1;
  --health: #1A7F37;   --health-bg: #EAF7EC;
  --social: #2563EB;   --social-bg: #EEF4FF;
  --hobbies: #7C3AED;  --hobbies-bg: #F4EEFF;

  /* Feature accent: purple-to-pink gradient on card titles (both ends ≥ 4.5:1 on the
     translucent cards, even over the darkest part of the landscape);
     icons are violet on a pale lavender-to-pink tile */
  --accent: #7C3AED;
  --accent-to: #BE185D;
  --accent-tile: linear-gradient(135deg, #F3EEFF, #FCEEF6);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, sans-serif;

  /* Horizontal page padding, kept clear of the notch in landscape */
  --gutter: clamp(16px, 5vw, 48px);
  --pad-left: max(var(--gutter), env(safe-area-inset-left));
  --pad-right: max(var(--gutter), env(safe-area-inset-right));

  /* Layered: light top edge, hairline, contact shadow, soft ambient shadows */
  --shadow-card:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 0 0 1px rgba(var(--shade), .03),
    0 1px 2px rgba(var(--shade), .05),
    0 4px 10px -4px rgba(var(--shade), .06),
    0 20px 40px -20px rgba(var(--shade), .2);
}

/* Domain classes only set tint variables; components decide how to use them.
   --tint-text is a slightly deeper shade where the base color is below 4.5:1 on its tint background.
*/
.work    { --tint: var(--work);    --tint-bg: var(--work-bg);    --tint-text: #C8283A; }
.health  { --tint: var(--health);  --tint-bg: var(--health-bg);  --tint-text: #197B36; }
.social  { --tint: var(--social);  --tint-bg: var(--social-bg);  }
.hobbies { --tint: var(--hobbies); --tint-bg: var(--hobbies-bg); }

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

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--bg);
  font: 400 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Misty landscape, with a light wash at the top so hero text stays readable */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(248, 250, 252, .7), rgba(248, 250, 252, .25) 55%, rgba(248, 250, 252, 0) 80%),
    url("/assets/landscape.svg") center bottom / cover no-repeat;
}

main { flex: 1 0 auto; }

svg { display: block; flex: none; }

/* Decorative graphics and the badge: not selectable, not draggable, no iOS long-press menu */
.brand img,
.icon,
.badge {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

a { color: inherit; }
a:focus-visible {
  outline: 2px solid var(--social);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Text for screen readers only */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font: 600 14px/1 var(--font);
}
.skip-link:focus { top: 12px; }

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: max(56px, env(safe-area-inset-top)) var(--pad-right) 48px var(--pad-left);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 32px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
/* 404 page: the logo and wordmark are a home link */
.brand a {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.brand img {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 24%;
  box-shadow:
    0 0 0 1px rgba(var(--shade), .04),
    0 1px 2px rgba(var(--shade), .08),
    0 14px 28px -12px rgba(30, 36, 48, .42);
}

.hero h1 {
  margin: 0 0 20px;
  max-width: 18em;
  font-size: clamp(34px, 4.6vw, 52px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.subhead {
  margin: 0 0 28px;
  max-width: 34em;
  color: var(--body);
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.45;
  text-wrap: pretty;
}

/* Black pill: "Coming soon" label on the home page, button on the 404 page */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(#323234, var(--ink));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.005em;
  white-space: nowrap;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    0 1px 2px rgba(var(--shade), .2),
    0 10px 24px -12px rgba(var(--shade), .6);
}
.badge svg {
  opacity: .85;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.badge svg + svg { margin-left: -4px; }
a.badge:hover { background: linear-gradient(#3e3e41, #2a2a2c); }

/* Four domain-colored segments, each glowing faintly in its own color */
.chromaline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: 120px;
  height: 5px;
  margin-top: 36px;
}
.chromaline i {
  border-radius: 3px;
  color: var(--tint);
  background: currentColor;
  box-shadow: 0 3px 8px -2px currentColor;
}

@media (min-width: 640px) {
  .hero { padding-top: max(120px, env(safe-area-inset-top)); padding-bottom: 72px; }
  .brand { gap: 14px; margin-bottom: 40px; font-size: 28px; }
  .brand img { width: 64px; height: 64px; }
  .subhead { margin-bottom: 36px; }
  .chromaline { margin-top: 44px; }
}

/* ---------- Features ---------- */

.features {
  max-width: calc(1080px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--pad-right) 64px var(--pad-left);
}
/* Focus target of the skip link; no ring needed on a whole section */
.features:focus { outline: none; }

.features h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
}
/* Short hairlines either side of the section label, fading outward */
.features h2::before,
.features h2::after {
  content: "";
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, rgba(var(--shade), 0), rgba(var(--shade), .22));
}
.features h2::after { transform: scaleX(-1); }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.feature {
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-card);
}
/* Frosted glass where supported, solid white otherwise */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .feature {
    border-color: rgba(var(--shade), .06);
    /* Slightly brighter at the top, like light falling on the card */
    background: linear-gradient(rgba(255, 255, 255, .95), rgba(255, 255, 255, .84));
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    backdrop-filter: blur(20px) saturate(1.2);
  }
}

.feature h3 {
  margin: 16px 0 6px;
  color: var(--accent);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
/* Gradient titles */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .feature h3 {
    width: fit-content; /* gradient spans the text, not the whole card */
    background-image: linear-gradient(100deg, var(--accent), var(--accent-to));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
.feature p {
  margin: 0;
  color: var(--body);
  font-size: 16px;
  line-height: 1.5;
}

/* Feature icon: Heroicons outline glyph (MIT) in violet on a soft tinted tile, with a faint violet hairline */
.icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-tile);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}
.icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Inline domain pill in body text */
.domain {
  padding: 1px 6px 2px;
  border-radius: 999px;
  color: var(--tint-text, var(--tint));
  background: var(--tint-bg);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 16%, transparent);
}
/* Larger subhead text: padding scales with the font size */
.subhead .domain { padding: .05em .4em .1em; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature { padding: 28px; }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}

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

/* Full width, outside the features container; bottom padding clears the iPhone home indicator */
.site-footer {
  padding: 0 var(--pad-right) max(40px, env(safe-area-inset-bottom)) var(--pad-left);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}
.site-footer p {
  max-width: 40em;
  margin: 0 auto;
  text-wrap: balance;
}
.site-footer a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(var(--shade), .25);
  text-underline-offset: 3px;
  white-space: nowrap;
}
.site-footer a:hover { text-decoration-color: currentColor; }

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

.notfound h1 { font-size: clamp(32px, 4vw, 44px); }

@media (min-width: 640px) {
  .notfound { padding-bottom: 40px; }
}

/* ---------- Very small screens ---------- */

/* After the 404 rules on purpose: the 30px headline applies on both pages */
@media (max-width: 359px) {
  .hero h1 { font-size: 30px; }
  .badge { gap: 8px; padding: 0 16px; font-size: 14px; }
}

/* ---------- Preferences and print ---------- */

@media (prefers-reduced-transparency: reduce) {
  .feature {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media print {
  body { background: #fff; }
  body::before,
  .skip-link { display: none; }
  .hero { padding-top: 24px; }
  .feature { break-inside: avoid; }
  .feature,
  .badge,
  .chromaline i { box-shadow: none; }
  .icon { background: none; box-shadow: inset 0 0 0 1px currentColor; }
  /* Backgrounds are usually not printed: fall back to solid colored titles */
  .feature h3 { background: none; -webkit-text-fill-color: currentColor; }
}

/* Windows High Contrast: no clipped-background text */
@media (forced-colors: active) {
  .feature h3 { background: none; -webkit-text-fill-color: currentColor; }
}
