/*
 * SolvedSeek — Brand Design System
 * Custom properties, base styles, and utility classes.
 * Works standalone or alongside Tailwind.
 */

/* ============================================================
   1. Design Tokens (Custom Properties)
   ============================================================ */
:root {
  /* Core palette */
  --color-ink:         #203040;
  --color-surface:     #F8F8F8;
  --color-white:       #FFFFFF;
  --color-accent:      #F09030;
  --color-accent-hover:#D87A20;
  --color-mid:         #9098A8;
  --color-panel:       #1F3343;
  --color-divider:     #E6E8EC;

  /* Support palette */
  --color-teal:        #25848A;
  --color-teal-deep:   #245561;
  --color-periwinkle:  #D6DBEE;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: var(--font-sans);

  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg:   1.125rem;  /* 18px */
  --text-xl:   1.75rem;   /* 28px */
  --text-2xl:  2.5rem;    /* 40px */
  --text-3xl:  3.25rem;   /* 52px */
  --text-4xl:  4rem;      /* 64px */
  --text-5xl:  4.5rem;    /* 72px */

  --leading-tight:  1.15;
  --leading-snug:   1.35;
  --leading-normal: 1.6;

  --tracking-tight: -0.025em;
  --tracking-normal: 0;

  /* Spacing */
  --space-1:  0.25rem;  /* 4 */
  --space-2:  0.5rem;   /* 8 */
  --space-3:  0.75rem;  /* 12 */
  --space-4:  1rem;     /* 16 */
  --space-5:  1.25rem;  /* 20 */
  --space-6:  1.5rem;   /* 24 */
  --space-8:  2rem;     /* 32 */
  --space-10: 2.5rem;   /* 40 */
  --space-12: 3rem;     /* 48 */
  --space-16: 4rem;     /* 64 */
  --space-18: 4.5rem;   /* 72 */
  --space-24: 6rem;     /* 96 */

  /* Layout */
  --max-content:  1280px;
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    12px;
  --radius-xl:    14px;

  /* Shadows */
  --shadow-soft: 0 10px 30px rgba(32, 48, 64, 0.10);
  --shadow-none: none;

  /* Transitions */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
}


/* ============================================================
   2. Reset & Base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-ink);
  background-color: var(--color-surface);
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity var(--duration-fast) var(--ease-default);
}
a:hover {
  opacity: 0.85;
  text-decoration: underline;
}


/* ============================================================
   3. Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-ink);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}

h1 { font-size: clamp(2.5rem, 5vw, var(--text-5xl)); }
h2 { font-size: clamp(2rem, 4vw, var(--text-3xl)); }
h3 { font-size: clamp(1.5rem, 3vw, var(--text-xl)); }
h4 { font-size: var(--text-lg); }

p {
  max-width: 65ch;
  margin-bottom: var(--space-4);
}
p:last-child { margin-bottom: 0; }

.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-mid  { color: var(--color-mid); }


/* ============================================================
   4. Layout Utilities
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-content);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.section {
  padding-top: var(--space-18);
  padding-bottom: var(--space-18);
}
@media (min-width: 768px) {
  .section {
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
  }
}

.grid {
  display: grid;
  gap: var(--space-8);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 767px) {
  .grid-2, .grid-3, .grid-4, .grid-5 {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .grid-3, .grid-4, .grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ============================================================
   5. Cards
   ============================================================ */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft);
}
@media (min-width: 768px) {
  .card { padding: var(--space-8); }
}


/* ============================================================
   6. Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-default),
              box-shadow var(--duration-fast) var(--ease-default);
  text-decoration: none;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  opacity: 1;
}

.btn-secondary {
  background: transparent;
  color: var(--color-ink);
  border: 1px solid rgba(32, 48, 64, 0.2);
}
.btn-secondary:hover {
  border-color: var(--color-ink);
  opacity: 1;
}

.btn-ghost {
  background: transparent;
  color: var(--color-accent);
  padding: var(--space-2) var(--space-3);
}


/* ============================================================
   7. Brand Link (arrow style)
   ============================================================ */
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-accent);
  font-weight: 500;
}
.brand-link::after {
  content: "\2192";  /* → */
  transition: transform var(--duration-fast) var(--ease-default);
}
.brand-link:hover::after {
  transform: translateX(3px);
}
.brand-link:hover {
  text-decoration: none;
  opacity: 1;
}

.brand-link--external::after {
  content: "\2197";  /* ↗ */
}


/* ============================================================
   8. Icon Utility
   ============================================================ */
.icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 32px; height: 32px; }
.icon-xl { width: 40px; height: 40px; }

.icon-accent { color: var(--color-accent); }
.icon-mid    { color: var(--color-mid); }


/* ============================================================
   9. Dividers
   ============================================================ */
.divider {
  border: none;
  border-top: 1px solid var(--color-divider);
  margin: var(--space-8) 0;
}

.divider-accent {
  border: none;
  border-top: 2px solid var(--color-accent);
  margin: var(--space-8) 0;
}


/* ============================================================
   10. Dark Panel (footer / mega panels)
   ============================================================ */
.panel-dark {
  background-color: var(--color-panel);
  color: rgba(255, 255, 255, 0.75);
}
.panel-dark h1,
.panel-dark h2,
.panel-dark h3,
.panel-dark h4 {
  color: var(--color-white);
}
.panel-dark a {
  color: rgba(255, 255, 255, 0.6);
}
.panel-dark a:hover {
  color: var(--color-white);
  opacity: 1;
}


/* ============================================================
   11. Dot Pattern Background
   ============================================================ */
.bg-dots {
  background-image: url("../patterns/dots.svg");
  background-repeat: repeat;
  background-size: 120px 120px;
}

.bg-dots-light {
  background-image: url("../patterns/dots-light.svg");
  background-repeat: repeat;
  background-size: 120px 120px;
}

.bg-dots-corner {
  position: relative;
}
.bg-dots-corner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 320px;
  height: 320px;
  background-image: url("../patterns/dots.svg");
  background-repeat: repeat;
  background-size: 120px 120px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}


/* ============================================================
   12. Spec List (MCR1/MCR2 style)
   ============================================================ */
.spec-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 768px) {
  .spec-list { grid-template-columns: 1fr 1fr; }
}

.spec-list__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}
.spec-list__item::before {
  content: "\2192";
  color: var(--color-accent);
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 0.1em;
}


/* ============================================================
   13. Utility Helpers
   ============================================================ */
.bg-surface   { background-color: var(--color-surface); }
.bg-white     { background-color: var(--color-white); }
.bg-panel     { background-color: var(--color-panel); }
.bg-accent    { background-color: var(--color-accent); }

.text-ink     { color: var(--color-ink); }
.text-accent  { color: var(--color-accent); }
.text-white   { color: var(--color-white); }
.text-mid     { color: var(--color-mid); }

.rounded-md   { border-radius: var(--radius-md); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-xl   { border-radius: var(--radius-xl); }

.shadow-soft  { box-shadow: var(--shadow-soft); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
