@import "tailwindcss";
@import "tw-animate-css";

@custom-variant dark (&:is(.dark *));

:root {
  color-scheme: light;
  --font-inter: "Inter";
  --font-cormorant: "Cormorant Garamond";
  --font-mono: "IBM Plex Mono";
  --background: oklch(0.99 0.005 85);
  --foreground: oklch(0.25 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.25 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.25 0 0);
  --primary: oklch(0.75 0.08 15);
  --primary-foreground: oklch(0.99 0.005 85);
  --secondary: oklch(0.96 0.02 75);
  --secondary-foreground: oklch(0.25 0 0);
  --muted: oklch(0.96 0.02 75);
  --muted-foreground: oklch(0.5 0 0);
  --accent: oklch(0.88 0.06 20);
  --accent-foreground: oklch(0.25 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.99 0.005 85);
  --border: oklch(0.92 0.01 75);
  --input: oklch(0.92 0.01 75);
  --ring: oklch(0.75 0.08 15);
  --radius: 1rem;
  /* Custom colors for Oona moment card */
  --oona-primary: #fad4d4;
  --oona-secondary: #fff5e9;
  --text-dark: #2a2a2a;
  --paper-shadow: rgba(0, 0, 0, 0.08);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: oklch(0.205 0 0);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);
}

.dark {
  color-scheme: dark;
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.145 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.145 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.985 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.637 0.237 25.331);
  --border: oklch(0.269 0 0);
  --input: oklch(0.269 0 0);
  --ring: oklch(0.439 0 0);
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(0.269 0 0);
  --sidebar-ring: oklch(0.439 0 0);
}

@theme inline {
  --font-sans: var(--font-inter), "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-serif: var(--font-cormorant), "Cormorant Garamond", serif;
  --font-mono: var(--font-mono), ui-monospace, SFMono-Regular, Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }

  body {
    @apply bg-background text-foreground;
  }
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.min-h-screen {
  min-height: 100vh;
}

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

.container {
  width: 100%;
  max-width: 1120px;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.py-16 {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.py-20 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.py-24 {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.text-center {
  text-align: center;
}

.font-serif {
  font-family: var(--font-serif);
}

.font-sans {
  font-family: var(--font-sans);
}

.font-semibold {
  font-weight: 600;
}

.font-medium {
  font-weight: 500;
}

.font-light {
  font-weight: 300;
}

.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.text-foreground {
  color: var(--foreground);
}

.text-muted-foreground {
  color: var(--muted-foreground);
}

.text-primary-foreground {
  color: var(--primary-foreground);
}

.text-lg {
  font-size: 1.125rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 1.2;
}

.text-5xl {
  font-size: 3rem;
  line-height: 1.1;
}

.leading-relaxed {
  line-height: 1.7;
}

.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}

.text-left {
  text-align: left;
}

.max-w-2xl {
  max-width: 36rem;
}

.max-w-3xl {
  max-width: 48rem;
}

.max-w-4xl {
  max-width: 56rem;
}

.max-w-7xl {
  max-width: 80rem;
}

.space-y-6 > * + * {
  margin-top: 1.5rem;
}

.space-y-8 > * + * {
  margin-top: 2rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gap-8 {
  gap: 2rem;
}

.flex {
  display: flex;
}

.justify-center {
  justify-content: center;
}

.inline-block {
  display: inline-block;
}

.px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.pt-4 {
  padding-top: 1rem;
}

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

.rounded-lg {
  border-radius: 0.75rem;
}

.transition-colors {
  transition: background-color 180ms ease, color 180ms ease;
}

.border-t {
  border-top-width: 1px;
  border-top-style: solid;
}

.border-border {
  border-color: var(--border);
}

.mt-20 {
  margin-top: 5rem;
}

.text-smaller {
  font-size: 0.75rem;
}

.list-none {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-card {
  display: block;
  padding: 1.75rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.link-card__title {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

.link-card__subtitle {
  display: block;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.link-card__slug {
  display: block;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--primary);
  font-family: var(--font-mono);
}

.moment-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 2rem;
}

.mc-stack {
  display: flex;
  justify-content: center;
}

.sw-mc {
  --paper-1: #fff5e9;
  --paper-2: #fad4d4;
  --ink: #2a2a2a;
  --frame: #cbb9a6;
  --frame-edge: #9e8e7e;
  --linen: #f3ece3;
  width: min(560px, 92vw);
  background: var(--linen);
  border: 2px solid var(--frame-edge);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18), inset 0 0 0 4px var(--frame);
  overflow: hidden;
  font-family: var(--font-serif);
  color: var(--ink);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.sw-mc.variant-alt {
  transform: rotate(-0.75deg) translateY(-4px);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.24),
    inset 0 0 0 4px color-mix(in sRGB, var(--frame) 85%, white);
}

.mc-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  background: linear-gradient(#efe7de, #e6d8ca);
  border-bottom: 1px solid #cdbfac;
}

.mc-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.mc-icon {
  font-size: 18px;
  opacity: 0.7;
}

.mc-art {
  margin: 10px 10px 0;
  border: 1px solid #bcae9c;
  border-radius: 10px;
  overflow: hidden;
  background: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.65), transparent 70%);
}

.mc-art svg {
  display: block;
  width: 100%;
  height: auto;
}

.mc-type {
  margin: 10px 10px 0;
  padding: 8px 10px;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: #efe7de;
  border: 1px solid #cdbfac;
  border-radius: 8px;
  font-family: var(--font-sans);
  color: #5a4d42;
}

.mc-rules {
  margin: 10px;
  padding: 14px 14px 12px;
  background: radial-gradient(circle at top left, var(--paper-2) 0%, var(--paper-1) 100%);
  border: 1px solid #d7c7b5;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.mc-quote {
  margin: 0 0 10px;
  font-size: 18px;
  font-style: italic;
  line-height: 1.45;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.mc-reminder {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  font-family: var(--font-sans);
  color: #3e3a36;
}

.mc-footer {
  margin: 8px 10px 12px;
  padding: 6px 6px 0;
  font: 600 10.5px / 1.4 var(--font-sans);
  color: #6b6055;
  border-top: 1px solid #e1d7ca;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.mc-footer.with-share {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.mc-footer .legal {
  font-size: 10.5px;
  line-height: 1.4;
}

.mc-footer.with-share .legal {
  grid-column: 1 / 2;
}

.mc-footer .slug {
  font-family: monospace;
  font-size: 10px;
  color: #9a8f80;
  letter-spacing: 0.03em;
}

.mc-footer.with-share .slug {
  justify-self: end;
}

.mc-footer .share {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #131938;
  border: 1px solid #2f3560;
  border-radius: 8px;
  padding: 6px 8px;
}

.share-link {
  color: #bcd0ff;
  text-decoration: none;
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-link:hover {
  color: #e7ecff;
  text-decoration: underline;
}

.sw-mc.oona {
  --paper-1: #fff5e9;
  --paper-2: #fad4d4;
}

.sw-mc.hex {
  --ink: #eaeaf4;
  --frame: #2a2e4a;
  --frame-edge: #161a2b;
  --linen: #0d1020;
  --hex-primary: #9a7bff;
  --hex-secondary: #56b8ff;
}

.sw-mc.hex .mc-titlebar {
  background: linear-gradient(#1c213d, #131733);
  border-bottom: 1px solid #2f3560;
}

.sw-mc.hex .mc-art {
  border: 1px solid #2d335f;
  background: radial-gradient(circle at 20% 15%, rgba(153, 116, 255, 0.3), rgba(20, 20, 45, 0.8) 70%);
}

.sw-mc.hex .mc-type {
  background: #151a35;
  border: 1px solid #2f3560;
  color: #9bb3ff;
}

.sw-mc.hex .mc-rules {
  background: radial-gradient(circle at 25% 15%, #9a7bff22 0%, #56b8ff14 100%);
  border: 1px solid #2f3560;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sw-mc.hex .mc-quote {
  color: #e8e6ff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

.sw-mc.hex .mc-reminder {
  color: #c9d6ff;
}

.sw-mc.hex .mc-footer {
  color: #9bb3ff;
  border-top: 1px solid #263056;
}

.sw-mc.hex .mc-footer .slug {
  color: #7aa6ff;
}

.sw-mc.hex .mc-footer .share {
  background: linear-gradient(135deg, rgba(34, 197, 218, 0.25), rgba(59, 130, 246, 0.35));
  border-color: rgba(88, 122, 255, 0.55);
}

.sw-mc.hex .share-link {
  color: #def1ff;
}

.sw-mc.hex .share-link:hover {
  color: #ffffff;
}

.lg\:grid-cols-2 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.xl\:grid-cols-2 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.md\:py-20 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.md\:py-24 {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.md\:text-xl {
  font-size: 1.25rem;
}

.md\:text-4xl {
  font-size: 2.25rem;
}

.md\:text-7xl {
  font-size: 4.5rem;
  line-height: 1.05;
}

@media (min-width: 640px) {
  .md\:py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .md\:py-24 {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

@media (min-width: 768px) {
  .md\:text-xl {
    font-size: 1.25rem;
  }

  .md\:text-4xl {
    font-size: 2.5rem;
  }

  .md\:text-7xl {
    font-size: 5rem;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (hover: hover) {
  .hover\:bg-primary\/90:hover {
    background-color: color-mix(in oklch, var(--primary) 90%, var(--primary-foreground) 10%);
  }

  .link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
    border-color: color-mix(in oklch, var(--border) 70%, var(--primary) 30%);
  }
}
