/* ==========================================================================
   SY Software — styles
   ========================================================================== */

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #111110;
  --muted: #6b6a66;
  --line: rgba(17, 17, 16, 0.1);

  --outscroll: #1fae63;
  --outscroll-tint: #e5f4ea;
  --nouma: #5a72c8;
  --nouma-rose: #e9a9a2;
  --nouma-tint: #e9ecf7;
  --alimoo: #ef9f2f;
  --alimoo-tint: #fbeedb;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;

  --radius-lg: 32px;
  --radius-md: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0d;
    --surface: #171716;
    --ink: #f2f1ec;
    --muted: #9a9993;
    --line: rgba(242, 241, 236, 0.1);

    --outscroll-tint: #13211a;
    --nouma-tint: #161b2b;
    --alimoo-tint: #261e12;
  }
}

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

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

* { margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

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

.container {
  width: min(1200px, 100% - 40px);
  margin-inline: auto;
}

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-head { margin-bottom: clamp(40px, 6vw, 72px); }

.section-title {
  margin-top: 14px;
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
}

/* Nav -------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 15px;
}

.nav__links a:not(.nav__cta) {
  color: var(--muted);
  transition: color .2s;
}
.nav__links a:not(.nav__cta):hover { color: var(--ink); }

.nav__cta {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  transition: transform .2s var(--ease), opacity .2s;
}
.nav__cta:hover { transform: translateY(-1px); opacity: .88; }

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

.hero {
  position: relative;
  padding: clamp(80px, 14vw, 180px) 0 clamp(80px, 10vw, 140px);
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: -20% -10% auto auto;
  width: 900px;
  height: 700px;
  max-width: 120vw;
  background:
    radial-gradient(closest-side at 30% 40%, color-mix(in srgb, var(--outscroll) 22%, transparent), transparent),
    radial-gradient(closest-side at 65% 35%, color-mix(in srgb, var(--nouma) 22%, transparent), transparent),
    radial-gradient(closest-side at 50% 70%, color-mix(in srgb, var(--alimoo) 22%, transparent), transparent);
  filter: blur(40px);
  opacity: .9;
  pointer-events: none;
  z-index: -1;
}

.hero__title {
  margin-top: 22px;
  max-width: 13ch;
  font-size: clamp(3rem, 9vw, 7.5rem);
  font-weight: 600;
  line-height: .95;
  letter-spacing: -0.055em;
}

.hero__title em { letter-spacing: -0.03em; }

.hero__lead {
  margin-top: 32px;
  max-width: 38rem;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--muted);
}

.hero__apps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 48px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .25s var(--ease), border-color .25s;
}

.chip:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--ink) 25%, transparent);
}

.chip strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.chip small {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.2;
}

.chip__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.chip__icon--outscroll { background: var(--outscroll); }
.chip__icon--nouma     { background: var(--nouma); }
.chip__icon--alimoo    { background: var(--alimoo); }

/* Apps ------------------------------------------------------------------- */

.apps { padding: clamp(60px, 8vw, 100px) 0; }

.app {
  --accent: var(--ink);
  --tint: var(--surface);

  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(32px, 6vw, 80px);
  border-radius: var(--radius-lg);
  background: var(--tint);
  overflow: hidden;
  scroll-margin-top: 96px;
}

.app + .app { margin-top: 24px; }

.app--outscroll { --accent: var(--outscroll); --tint: var(--outscroll-tint); }
.app--nouma     { --accent: var(--nouma);     --tint: var(--nouma-tint); }
.app--alimoo    { --accent: var(--alimoo);    --tint: var(--alimoo-tint); }

.app--flip .app__copy   { order: 2; }
.app--flip .app__visual { order: 1; }

.app__tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}

.app__title {
  margin-top: 20px;
  font-size: clamp(2.2rem, 4.4vw, 3.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
}

.app__title em { color: var(--accent); }

.app__text {
  margin-top: 24px;
  max-width: 32rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.app__features {
  margin-top: 28px;
  display: grid;
  gap: 12px;
}

.app__features li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
}

.app__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.app__features li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: calc(.45em + 4px);
  width: 6px;
  height: 4px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

.app__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s;
}

.btn:hover { transform: translateY(-2px); }

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

.btn--ghost {
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
}
.btn--ghost:hover { border-color: color-mix(in srgb, var(--ink) 40%, transparent); }

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* Phone mockup ------------------------------------------------------------ */

.app__visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.app__visual::before {
  content: "";
  position: absolute;
  inset: 10% 5%;
  border-radius: 50%;
  background: var(--accent);
  opacity: .22;
  filter: blur(60px);
}

.phone {
  position: relative;
  width: 280px;
  aspect-ratio: 9 / 19;
  padding: 10px;
  border-radius: 48px;
  background: #0b0b0b;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .06) inset,
    0 40px 80px -30px rgba(0, 0, 0, .45),
    0 20px 40px -20px rgba(0, 0, 0, .3);
  transform: rotate(-2deg);
  transition: transform .6s var(--ease);
}

.app--flip .phone { transform: rotate(2deg); }
.app:hover .phone { transform: rotate(0) translateY(-6px); }

.screen {
  position: relative;
  height: 100%;
  border-radius: 38px;
  padding: 56px 20px 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
}

/* Dynamic island */
.screen::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 84px;
  height: 24px;
  border-radius: 999px;
  background: #000;
  transform: translateX(-50%);
}

/* Outscroll screen */
.screen--outscroll {
  background: radial-gradient(120% 60% at 50% 0%, #17361f 0%, #0b120d 70%);
  color: #effaf2;
}

.os-chip {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(255, 255, 255, .08);
  color: #9be7b7;
}

.os-label {
  margin-top: 28px;
  font-size: 13px;
  color: rgba(239, 250, 242, .6);
}

.os-count {
  font-size: 88px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
}

.os-count span {
  font-size: 28px;
  font-weight: 500;
  color: rgba(239, 250, 242, .4);
  letter-spacing: -0.02em;
}

.os-bar {
  margin-top: 18px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}

.os-bar span {
  display: block;
  height: 100%;
  width: 70%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1fae63, #6ee69c);
  animation: fill 2.4s var(--ease) both;
}

@keyframes fill { from { width: 8%; } }

.os-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}

.os-stats div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
}

.os-stats b {
  display: block;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.os-stats small {
  font-size: 11px;
  color: rgba(239, 250, 242, .55);
}

.os-unlock {
  margin-top: auto;
  padding: 14px;
  border-radius: 18px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  background: #1fae63;
  color: #04170b;
}

/* Nouma screen */
.screen--nouma {
  background: #f7f3ec;
  color: #1d2236;
  align-items: center;
}

.nm-date {
  align-self: flex-start;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.nm-dial {
  position: relative;
  margin-top: 22px;
  width: 188px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(
    #5a72c8 0 9%,
    #e9a9a2 9% 21%,
    #5a72c8 21% 30%,
    #e9a9a2 30% 43%,
    #5a72c8 43% 47%,
    #e5ded2 47% 100%
  );
  animation: spin-in 1.6s var(--ease) both;
}

@keyframes spin-in { from { transform: rotate(-60deg); opacity: 0; } }

/* Ring cut-out */
.nm-dial::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: #f7f3ec;
}

/* "Now" marker */
.nm-dial::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #1d2236;
  border: 3px solid #f7f3ec;
  transform: rotate(169deg) translateY(-86px);
}

.nm-dial__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 1.25;
  animation: spin-out 1.6s var(--ease) both;
}

@keyframes spin-out { from { transform: rotate(60deg); } }

.nm-dial__center small {
  font-size: 11px;
  color: #7a7f93;
}

.nm-dial__center b {
  font-size: 26px;
  letter-spacing: -0.04em;
}

.nm-rows {
  width: 100%;
  margin-top: 24px;
  display: grid;
  gap: 8px;
}

.nm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
}

.nm-row em {
  margin-left: auto;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 500;
  color: #7a7f93;
}

.nm-ico {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.nm-ico--sleep { background: #5a72c8; }
.nm-ico--feed  { background: #e9a9a2; }

.nm-swipe {
  width: 100%;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 18px;
  background: #1d2236;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.nm-swipe span { animation: nudge 1.8s ease-in-out infinite; }

@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(4px); }
}

/* Alimoo screen */
.screen--alimoo {
  background: linear-gradient(180deg, #fff3df 0%, #fffaf2 60%);
  color: #2a1f12;
}

.al-kicker {
  font-size: 12px;
  font-weight: 500;
  color: #b8742a;
}

.al-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.al-list {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.al-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(80, 50, 10, .06);
}

.al-food {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #fdf0da;
  font-size: 18px;
}

.al-item b {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.al-item small {
  font-size: 11px;
  color: #9a8a75;
}

.al-tag {
  margin-left: auto;
  flex: none;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 600;
  background: #eef1e6;
  color: #5d6b3a;
}
.al-tag--new      { background: #fde9c8; color: #a8641b; }
.al-tag--allergen { background: #fbe1dc; color: #b04a3a; }

.al-progress {
  margin-top: auto;
  padding: 14px;
  border-radius: 18px;
  background: #2a1f12;
  color: #fff6e8;
}

.al-progress__head {
  font-size: 12px;
  color: rgba(255, 246, 232, .7);
}

.al-progress__head b {
  font-size: 20px;
  color: #fff6e8;
  letter-spacing: -0.03em;
  margin-right: 2px;
}

.al-progress__bar {
  margin-top: 10px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}

.al-progress__bar span {
  display: block;
  width: 46%;
  height: 100%;
  border-radius: inherit;
  background: #ef9f2f;
  animation: fill 2.4s var(--ease) both;
}

/* Statement -------------------------------------------------------------- */

.statement { padding: clamp(80px, 12vw, 160px) 0; }

.statement__text {
  max-width: 22ch;
  font-size: clamp(2rem, 4.6vw, 4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.statement__text span { color: var(--muted); }

@media (min-width: 900px) {
  .statement__text { max-width: 26ch; }
}

/* Approach --------------------------------------------------------------- */

.approach { padding-bottom: clamp(80px, 10vw, 140px); }

.principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.principle {
  padding: 32px 28px 8px 0;
}

.principle + .principle {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.principle__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--muted);
}

.principle h3 {
  margin-top: 40px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.principle p {
  margin-top: 10px;
  font-size: 15px;
  color: var(--muted);
}

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

.contact { padding-bottom: clamp(60px, 8vw, 100px); }

.contact__card {
  position: relative;
  padding: clamp(40px, 8vw, 110px) clamp(28px, 6vw, 80px);
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--bg);
  overflow: hidden;
}

.contact__card::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -60%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--outscroll), var(--nouma), var(--alimoo), var(--outscroll));
  filter: blur(90px);
  opacity: .35;
  pointer-events: none;
}

.contact__card .eyebrow {
  color: color-mix(in srgb, var(--bg) 60%, transparent);
}

.contact__title {
  position: relative;
  margin-top: 16px;
  font-size: clamp(3.5rem, 11vw, 9rem);
  font-weight: 600;
  line-height: .9;
  letter-spacing: -0.06em;
}

.contact__text {
  position: relative;
  margin-top: 24px;
  max-width: 28rem;
  color: color-mix(in srgb, var(--bg) 65%, transparent);
}

.contact__mail {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding-bottom: 6px;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  border-bottom: 1px solid color-mix(in srgb, var(--bg) 35%, transparent);
  transition: border-color .2s, gap .3s var(--ease);
  overflow-wrap: anywhere;
}

.contact__mail:hover {
  gap: 20px;
  border-color: var(--bg);
}

.contact__card :focus-visible { outline-color: var(--bg); }

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

.footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer__links {
  display: flex;
  gap: 28px;
  font-size: 15px;
  color: var(--muted);
}

.footer__links a { transition: color .2s; }
.footer__links a:hover { color: var(--ink); }

.footer__copy {
  font-size: 14px;
  color: var(--muted);
}

/* Motion ----------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .fade {
    animation: fade-up .9s var(--ease) both;
    animation-delay: var(--d, 0s);
  }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: fade-up linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 960px) {
  .app,
  .app--flip {
    grid-template-columns: 1fr;
  }

  .app--flip .app__copy,
  .app--flip .app__visual { order: 0; }

  .app__visual { margin-top: 8px; }

  .principles { grid-template-columns: 1fr 1fr; }

  .principle:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .principle:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .container { width: calc(100% - 32px); }

  .nav__links a:not(.nav__cta) { display: none; }

  .logo__word { display: none; }
  .footer .logo__word { display: inline; }

  .hero__apps { flex-direction: column; align-items: flex-start; }

  .app { border-radius: 24px; }

  .phone { width: 250px; }

  .principles { grid-template-columns: 1fr; }

  .principle,
  .principle + .principle {
    padding: 28px 0;
    border-left: 0;
  }

  .principle + .principle { border-top: 1px solid var(--line); }

  .principle h3 { margin-top: 16px; }

  .footer__inner { flex-direction: column; align-items: flex-start; }
}
