/* ==========================================================
   Small Cat Factory — Homepage styles
   Self-contained: design tokens + base reset + page layout.
   Tokens are drawn from the Small Cat Factory Design System.
   ========================================================== */

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  /* Brand core */
  --color-navy:          #2B3A67;
  --color-navy-light:    #3D5087;
  --color-blue:          #4A7FB5;
  --color-blue-dark:     #3A6A9A;
  --color-cream:         #FAF6F0;

  /* Warm-tinted neutrals */
  --color-gray-200:      #E8E5DE;
  --color-gray-300:      #D1CCC3;
  --color-gray-400:      #A9A49A;
  --color-gray-600:      #5C5850;

  /* Semantic */
  --surface-page:        var(--color-cream);
  --surface-card:        #FFFFFF;
  --text-primary:        var(--color-navy);
  --text-secondary:      var(--color-gray-600);
  --text-tertiary:       var(--color-gray-400);
  --text-link:           var(--color-blue);
  --text-link-hover:     var(--color-blue-dark);
  --border-default:      var(--color-gray-200);

  /* Type */
  --font-display:  'Nunito', system-ui, -apple-system, sans-serif;
  --font-body:     'DM Sans', system-ui, -apple-system, sans-serif;

  --text-xs:    0.75rem;   /* 12px */
  --text-sm:    0.875rem;  /* 14px */
  --text-base:  1rem;      /* 16px */
  --text-md:    1.125rem;  /* 18px */
  --text-xl:    1.5rem;     /* 24px */
  --text-2xl:   1.875rem;  /* 30px */
  --text-3xl:   2.25rem;   /* 36px */

  --weight-bold:      700;
  --weight-extrabold: 800;

  --leading-tight:    1.15;
  --leading-relaxed:  1.65;

  --tracking-tight:    0;
  --tracking-wider:    0.08em;

  /* Spacing (4px base) */
  --space-2:   0.5rem;   /*  8px */
  --space-3:   0.75rem;  /* 12px */
  --space-4:   1rem;     /* 16px */
  --space-5:   1.25rem;  /* 20px */
  --space-6:   1.5rem;   /* 24px */
  --space-8:   2rem;     /* 32px */
  --space-10:  2.5rem;   /* 40px */

  /* Radius / shadow / motion */
  --radius-md:     8px;
  --radius-lg:     12px;
  --shadow-sm:     0 1px 3px rgba(43, 58, 103, 0.08),
                   0 1px 2px rgba(43, 58, 103, 0.04);
  --shadow-md:     0 4px 6px rgba(43, 58, 103, 0.07),
                   0 2px 4px rgba(43, 58, 103, 0.04);
  --ease-default:  cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 120ms;
  --duration-slow: 350ms;
}

/* ── Base reset ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--surface-page);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}
a:hover { color: var(--text-link-hover); }

::selection {
  background: var(--color-blue);
  color: #fff;
}

/* ── Page layout ─────────────────────────────────────────── */
.page-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-10) var(--space-6);
  text-align: center;
}

.logo-img {
  width: 220px;
  height: auto;
  margin-bottom: var(--space-6);
}

.tagline {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: var(--text-3xl);
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}

.description {
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 45ch;
  margin: 0 0 var(--space-8);
  text-wrap: pretty;
}

.divider {
  width: 40px;
  height: 2px;
  background: var(--border-default);
  margin: 0 auto var(--space-6);
  border: none;
}

.apps-heading {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin: 0 0 var(--space-4);
}

/* ── App card ────────────────────────────────────────────── */
.app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-6) var(--space-5);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 22%;
  box-shadow: var(--shadow-sm);
}

.app-name {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: var(--text-xl);
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin: var(--space-2) 0 0;
}

.app-tagline {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 28ch;
  margin: 0 0 var(--space-3);
}

/* ── External app link ───────────────────────────────────── */
.app-site-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-navy);
  color: #fff;
  border-radius: var(--radius-md);
  min-height: 44px;
  padding: 0 var(--space-5);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast) var(--ease-default),
              background-color var(--duration-fast) var(--ease-default),
              box-shadow var(--duration-fast) var(--ease-default);
}
.app-site-link:hover {
  background: var(--color-navy-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.app-site-link:active {
  transform: translateY(0) scale(0.97);
}
.app-site-link:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer-bar {
  padding: var(--space-4) var(--space-6);
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-default);
}
.footer-bar a { color: var(--text-secondary); }
.footer-bar a:hover { color: var(--text-primary); }
.footer-bar .dot { margin: 0 var(--space-2); color: var(--color-gray-300); }

/* ── Entrance motion (subtle, per brand guidelines) ──────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
  animation: fade-up var(--duration-slow) var(--ease-default) both;
}

@media (prefers-reduced-motion: reduce) {
  .fade-up { animation: none; }
  .app-site-link { transition: none; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .logo-img   { width: 160px; }
  .tagline    { font-size: var(--text-2xl); }
  .description { font-size: var(--text-base); }
}
