/* ==========================================================================
   過期哭哭 Never Expire — product website
   Follows the app's design system v4「冰箱貼」
   (design-system/never-expire/MASTER.md): the same semantic colours, radii
   and type scale. By day a fridge door with magnets on mint; by night the
   fridge light on a deep blue-green, cards one step lighter than the page.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Semantic colours (MASTER.md 4.1) */
  --background: #e2f4e9;
  --surface: #ffffff;
  --sunken: #d4ecdf;
  --text: #17231e;
  --muted: #4a5d55;
  --rule: #c9e2d4;
  --primary: #17794f;
  --primary-pressed: #126640;
  --on-primary: #ffffff;
  --primary-soft: #d2f0df;
  --on-primary-soft: #0f5a3a;
  --accent-soft: #fff4d1;
  --expired: #bf2a1d;
  --expired-soft: #ffe3dd;
  --soon: #995600;
  --soon-soft: #ffefc8;
  --fresh: #0f5a3a;
  --fresh-soft: #d2f0df;
  --card-edge: transparent;
  --mist: rgb(255 255 255 / 60%);

  /* Place tags (MASTER.md 4.2) */
  --tag-sky: #d6ebfd;
  --on-tag-sky: #174a76;
  --tag-mint: #dceee3;
  --on-tag-mint: #29513e;
  --tag-pink: #ffdce8;
  --on-tag-pink: #831f4a;
  --tag-yellow: #ffeaa6;
  --on-tag-yellow: #5e4400;
  --tag-white: #ffffff;
  --on-tag-white: #17231e;

  /* Illustration ink: the same in both themes (MASTER.md 4.3) */
  --line: #17231e;

  /* Elevation (MASTER.md 4.4): dark mode draws a 1px edge instead */
  --elevation-card: 0 1px 2px rgb(23 35 30 / 5%), 0 4px 12px rgb(23 35 30 / 5%);
  --elevation-lift: 0 10px 24px rgb(23 35 30 / 14%);

  --radius-tag: 10px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC",
    "Noto Sans CJK TC", "Microsoft JhengHei", "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #132833;
    --surface: #1d3846;
    --sunken: #173140;
    --text: #f1f8f5;
    --muted: #b2c8ce;
    --rule: #2d4b59;
    --primary: #8eddb0;
    --primary-pressed: #a6e6c1;
    --on-primary: #06301e;
    --primary-soft: #2f4d49;
    --on-primary-soft: #bdefd3;
    --accent-soft: #3f3a1f;
    --expired: #ff9e90;
    --expired-soft: #4c2833;
    --soon: #f1c886;
    --soon-soft: #45391d;
    --fresh: #9ee0ba;
    --fresh-soft: #2b4744;
    --card-edge: #2d4b59;
    --mist: rgb(142 221 176 / 6%);

    --tag-sky: #1f4767;
    --on-tag-sky: #bde1ff;
    --tag-mint: #2b4744;
    --on-tag-mint: #9ee0ba;
    --tag-pink: #4e2645;
    --on-tag-pink: #ffc6dc;
    --tag-yellow: #4b3f13;
    --on-tag-yellow: #f4e2b1;
    --tag-white: #2c4757;
    --on-tag-white: #f1f8f5;

    --elevation-card: none;
    --elevation-lift: 0 10px 24px rgb(4 14 19 / 45%);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

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

.wrap {
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
}

.doc .wrap {
  width: min(100% - 32px, 760px);
}

/* Inline SVG sprite and icons */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.face {
  flex: none;
  width: 28px;
  height: 28px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  box-shadow: var(--elevation-card);
}

.brand-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  align-items: center;
}

/* The studio behind the app, a quiet way back to its home page. */
.studio {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.studio::before {
  content: "";
  width: 1px;
  height: 18px;
  background: var(--rule);
}

.studio:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.site-header nav a {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}

.site-header nav a:hover {
  color: var(--text);
  background: var(--sunken);
}

.site-header nav .lang {
  color: var(--on-primary-soft);
  background: var(--primary-soft);
}

.site-header nav .lang:hover {
  color: var(--on-primary-soft);
  background: var(--primary-soft);
  text-decoration: underline;
}

@media (max-width: 639px) {
  .site-header nav .nav-optional {
    display: none;
  }

  /* Phones keep the language switch beside the app name, so the studio
     drops under the name instead of pushing it to a second row. */
  .site-header {
    align-items: flex-start;
  }

  .site-header nav {
    margin-top: 2px;
  }

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

  .studio {
    margin: -10px 0 0 52px;
  }

  .studio::before {
    display: none;
  }
}

/* ==========================================================================
   Shared pieces: eyebrow, buttons, tags, speech bubble, QR card
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  width: fit-content;
  margin: 0 0 20px;
  padding: 6px 14px 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--on-primary-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.button {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 24px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 90ms ease-out, background-color 160ms ease-out;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--elevation-card);
}

.button-primary:hover {
  background: var(--primary-pressed);
}

.tag {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  width: fit-content;
  margin: 0;
  padding: 4px 10px;
  border-radius: var(--radius-tag);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.tag .icon {
  width: 1.1em;
  height: 1.1em;
}

.tag-sky {
  background: var(--tag-sky);
  color: var(--on-tag-sky);
}

.tag-mint {
  background: var(--tag-mint);
  color: var(--on-tag-mint);
}

.tag-pink {
  background: var(--tag-pink);
  color: var(--on-tag-pink);
}

.tag-yellow {
  background: var(--tag-yellow);
  color: var(--on-tag-yellow);
}

.tag-white {
  background: var(--tag-white);
  color: var(--on-tag-white);
  box-shadow: inset 0 0 0 1px var(--rule);
}

/* 哭哭冰箱 and its speech bubble: lemon cream, a dark outline, a tail
   pointing at the fridge. */
.companion {
  display: flex;
  gap: 14px;
  align-items: center;
}

.companion-mascot {
  flex: none;
  width: clamp(104px, 26vw, 148px);
}

.bubble {
  position: relative;
  margin: 0;
  padding: 14px 18px;
  border: 2px solid var(--text);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.bubble::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -9px;
  width: 14px;
  height: 14px;
  border-bottom: 2px solid var(--text);
  border-left: 2px solid var(--text);
  border-bottom-left-radius: 3px;
  background: var(--accent-soft);
  transform: translateY(-50%) rotate(45deg);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.qr-card {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  padding: 8px 18px 8px 8px;
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--elevation-card);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  text-decoration: none;
}

.qr-card img {
  width: 72px;
  height: 72px;
  padding: 4px;
  border-radius: var(--radius-tag);
  background: #ffffff;
}

.qr-card strong {
  display: block;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 800;
}

.qr-card:hover strong {
  text-decoration: underline;
}

@media (max-width: 899px) {
  .qr-card {
    display: none;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: 16px 0 64px;
}

/* heroMist: the soft organic curves from the app's sign-in page */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  background: var(--mist);
  pointer-events: none;
}

.hero::before {
  top: -260px;
  left: -220px;
  width: 620px;
  height: 520px;
  border-radius: 46% 54% 62% 38% / 52% 40% 60% 48%;
}

.hero::after {
  top: 40px;
  right: -240px;
  width: 700px;
  height: 600px;
  border-radius: 58% 42% 38% 62% / 45% 55% 45% 55%;
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  margin-bottom: 20px;
  font-size: clamp(2.2rem, 1.3rem + 3.6vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.01em;
}

.hero h1 .accent-line {
  color: var(--primary);
}

.lead {
  max-width: 30em;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.7;
}

.perks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.perks li {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.perks .icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
  stroke-width: 2.6;
}

/* The app's home screen, drawn in HTML: the fridge companion, status tiles
   and two item rows stuck on like magnets. */
.hero-scene {
  display: grid;
  gap: 16px;
  width: min(100%, 480px);
  margin-inline: auto;
  pointer-events: none;
  user-select: none;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
  min-height: 76px;
  padding: 10px 4px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
}

.tile-count {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 1.18rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.tile .face {
  width: 26px;
  height: 26px;
}

.tile-expired {
  background: var(--expired-soft);
  color: var(--expired);
}

.tile-soon {
  background: var(--soon-soft);
  color: var(--soon);
}

.tile-later {
  background: var(--fresh-soft);
  color: var(--fresh);
}

.magnet {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--elevation-lift);
}

.magnet-a {
  transform: rotate(-1.4deg);
}

.magnet-b {
  transform: rotate(1.1deg);
}

.item-pic {
  display: grid;
  flex: none;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
}

.item-pic .face {
  width: 36px;
  height: 36px;
}

.pic-mint {
  background: var(--tag-mint);
}

.pic-sky {
  background: var(--tag-sky);
}

.item-text {
  display: grid;
  flex: 1;
  gap: 4px;
  min-width: 0;
}

.item-name {
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.25;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.status {
  flex: none;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.94rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-expired {
  background: var(--expired-soft);
  color: var(--expired);
}

.status-soon {
  background: var(--soon-soft);
  color: var(--soon);
}

@media (min-width: 480px) {
  .magnet-a {
    margin-right: 24px;
  }

  .magnet-b {
    margin-left: 32px;
  }
}

@media (min-width: 900px) {
  .hero {
    padding: 40px 0 112px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 64px;
  }
}

@media (max-width: 639px) {
  .hero .cta-row .button {
    width: 100%;
  }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: 64px 0;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 40em;
  margin: 0 auto 48px;
  text-align: center;
}

.section-header .eyebrow {
  margin-bottom: 16px;
}

.section-header h2 {
  margin-bottom: 12px;
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
  font-weight: 900;
}

.section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

@media (min-width: 900px) {
  .section {
    padding: 72px 0;
  }

  .section-header {
    margin-bottom: 64px;
  }
}

/* ==========================================================================
   Showcase: a screenshot in a coloured panel next to its story,
   alternating sides on wide screens.
   ========================================================================== */
.showcase-list {
  display: grid;
  gap: 72px;
}

.showcase-item {
  display: grid;
  gap: 28px;
  align-items: center;
}

.showcase-media {
  display: flex;
  justify-content: center;
  height: 420px;
  padding-top: 40px;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.media-sky {
  background: var(--tag-sky);
}

.media-white {
  background: var(--tag-white);
}

.media-pink {
  background: var(--tag-pink);
}

.media-yellow {
  background: var(--tag-yellow);
}

/* The phone is drawn like the app's illustrations: dark ink, round corners.
   Its bottom runs off the panel. */
.phone {
  flex: none;
  align-self: flex-start;
  width: min(72%, 250px);
  padding: 8px;
  border-radius: 40px;
  background: var(--line);
  box-shadow: var(--elevation-lift);
}

.phone img {
  width: 100%;
  border-radius: 32px;
}

/* A lock-screen capture that already has its own phone outline. */
.phone-bare {
  padding: 0;
  border-radius: 34px;
  background: none;
  overflow: hidden;
}

.phone-bare img {
  border-radius: 0;
}

.showcase-content h3 {
  margin: 16px 0 12px;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  font-weight: 900;
}

.showcase-content > p {
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.7;
}

.showcase-content .tag {
  padding: 6px 12px;
  font-size: 0.94rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 700;
}

.chips .icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
  stroke-width: 2.6;
}

@media (min-width: 900px) {
  .showcase-list {
    gap: 112px;
  }

  .showcase-item {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
  }

  .showcase-item:nth-child(even) .showcase-media {
    order: 2;
  }

  .showcase-media {
    height: 540px;
    padding-top: 56px;
  }

  .phone {
    width: 290px;
  }
}

/* ==========================================================================
   Feature cards: an icon in a soft green square, like the settings rows
   ========================================================================== */
.features-grid {
  display: grid;
  gap: 16px;
}

.feature-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 6px 18px;
  align-content: start;
  padding: 24px;
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--elevation-card);
}

.feature-icon {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--on-primary-soft);
}

.feature-icon .icon {
  width: 28px;
  height: 28px;
}

.feature-card h3 {
  align-self: center;
  font-size: 1.18rem;
  font-weight: 800;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

@media (min-width: 720px) {
  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

/* ==========================================================================
   Closing
   ========================================================================== */
.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--elevation-card);
  text-align: center;
}

.closing-mascot {
  width: 152px;
  margin-bottom: 8px;
}

.closing h2 {
  margin-bottom: 12px;
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.4rem);
  font-weight: 900;
}

.closing-lead {
  max-width: 30em;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 1.06rem;
}

.closing .cta-row {
  justify-content: center;
}

.note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 639px) {
  .closing .cta-row,
  .closing .cta-row .button {
    width: 100%;
  }
}

@media (min-width: 900px) {
  .closing {
    padding: 64px 48px;
  }
}

/* ==========================================================================
   Policies and other documents
   ========================================================================== */
.doc main {
  padding: 16px 0 48px;
}

.doc h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 1.5rem + 2vw, 2.6rem);
  font-weight: 900;
}

.doc .meta {
  display: inline-flex;
  margin: 0 0 28px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--on-primary-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.doc article {
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--elevation-card);
}

.doc article > :first-child {
  margin-top: 0;
}

.doc h2 {
  margin: 36px 0 12px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-size: 1.18rem;
  font-weight: 800;
}

.doc article > h2:first-child {
  padding-top: 0;
  border-top: 0;
}

.doc p,
.doc li {
  line-height: 1.75;
}

.doc ol,
.doc ul {
  margin: 12px 0;
  padding-left: 1.3em;
}

.doc li + li {
  margin-top: 8px;
}

.doc li::marker {
  color: var(--primary);
  font-weight: 800;
}

.doc article a {
  font-weight: 600;
}

/* 404 */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 0 32px;
  text-align: center;
}

.not-found .companion {
  margin-bottom: 32px;
}

.not-found .bubble {
  text-align: left;
}

.not-found h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 1.5rem + 2vw, 2.6rem);
  font-weight: 900;
}

.not-found p:not(.bubble) {
  margin: 0 0 32px;
  color: var(--muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: 32px;
  padding: 28px 0 48px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin-bottom: 8px;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer p {
  margin: 0;
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
