/* ==========================================================================
   Prism Path Digital — company site styles
   Brand system: Navy #1D3557 + Warm off-white #FBFAF7 + spectrum accents.
   Type: Georgia (serif) for wordmark & headings, Inter (sans) for UI & body.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --navy:        #1D3557;
  --navy-soft:   rgba(29, 53, 87, 0.72);
  --navy-mute:   rgba(29, 53, 87, 0.55);
  --navy-line:   rgba(29, 53, 87, 0.14);
  --off-white:   #FBFAF7;
  --off-white-2: #F5F1E8;
  --off-white-3: #EDE7DA;

  --rose:        #E63946;
  --amber:       #F4A261;
  --sun:         #E9C46A;
  --teal:        #2A9D8F;
  --slate-blue:  #457B9D;
  --violet:      #6A4C93;

  --serif: "Playfair Display", Georgia, "Iowan Old Style", "Cambria", "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --container: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(29, 53, 87, 0.05), 0 2px 6px rgba(29, 53, 87, 0.05);
  --shadow-md: 0 4px 12px rgba(29, 53, 87, 0.06), 0 12px 28px rgba(29, 53, 87, 0.08);
  --shadow-lg: 0 8px 20px rgba(29, 53, 87, 0.08), 0 24px 56px rgba(29, 53, 87, 0.12);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--navy);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
::selection { background: rgba(230, 57, 70, 0.18); color: var(--navy); }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(4rem, 9vw, 7.5rem);
}
.section + .section {
  border-top: 1px solid var(--navy-line);
}

.label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--navy-mute);
  margin: 0 0 1.25rem;
}

.section-header {
  max-width: 720px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-heading {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  line-height: 1.08;
  color: var(--navy);
}
.section-sub {
  margin-top: 1rem;
  font-size: 1.075rem;
  color: var(--navy-soft);
  max-width: 44ch;
}

/* Reveal on scroll (progressively enhanced by JS) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: var(--off-white);
  padding: 0.6rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
  font-size: 0.9rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 250, 247, 0.86);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}
.site-header.is-scrolled {
  border-bottom-color: var(--navy-line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px;
  gap: 2rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  color: var(--navy);
}
.brand-mark { width: 34px; height: 34px; color: var(--navy); }
.brand-wordmark { display: inline-flex; flex-direction: column; line-height: 1; }
.brand-serif {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--navy);
}
.brand-caps {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--navy-mute);
  margin-top: 3px;
}
.site-nav {
  display: flex; align-items: center; gap: 1.75rem;
}
.site-nav a {
  font-size: 0.94rem;
  color: var(--navy-soft);
  padding: 0.4rem 0.1rem;
  position: relative;
  transition: color 0.2s var(--ease-out);
}
.site-nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--navy); }
.site-nav a:hover::after, .site-nav a:focus-visible::after { transform: scaleX(1); }

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(3rem, 8vw, 5.5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(1200px 500px at 82% -10%, rgba(230, 57, 70, 0.05), transparent 60%),
    radial-gradient(900px 500px at 10% 10%, rgba(69, 123, 157, 0.06), transparent 60%),
    var(--off-white);
  overflow: hidden;
}
.hero-inner { text-align: left; }
.hero-text { max-width: 620px; }
.hero-heading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 6.4vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--navy);
  margin-bottom: 1.6rem;
}

/* Two-column hero: text left, video right on desktop */
@media (min-width: 900px) {
  .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    max-width: 1240px;
  }
  .hero-text { max-width: none; }
  .hero-heading { font-size: clamp(2.6rem, 4.4vw, 3.75rem); }
  .hero-cta { margin-bottom: 0; }
}
.hero-heading em {
  font-style: italic;
  font-weight: 400;
  color: var(--navy);
  /* subtle serif emphasis; no color shift keeps the mood editorial */
}
.hero-sub {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--navy-soft);
  max-width: 46ch;
  margin-bottom: 2.2rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 3.5rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 500;
  transition: transform 0.2s var(--ease-out), background 0.2s var(--ease-out),
              color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  will-change: transform;
}
.btn:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.btn-primary {
  background: var(--navy);
  color: var(--off-white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary span { transition: transform 0.25s var(--ease-out); }
.btn-primary:hover span { transform: translateX(3px); }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy-line);
}
.btn-ghost:hover { background: rgba(29, 53, 87, 0.04); border-color: rgba(29, 53, 87, 0.24); }

/* Prism hero video */
.prism {
  margin: 0;
  padding: 1.5rem 0 0;
  max-width: 900px;
}
@media (min-width: 900px) {
  .prism { padding: 0; max-width: none; }
}
.prism-video {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: var(--navy);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  /* Subtle fade-in when the video is ready to play */
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}
.prism-video.is-ready { opacity: 1; }

/* ---------- About (two-col) ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 900px) {
  .two-col {
    grid-template-columns: 5fr 6fr;
    gap: clamp(2.5rem, 6vw, 5rem);
  }
}
.two-col-lead .section-heading {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
}
.prose p + p { margin-top: 1.15em; }
.prose p {
  font-size: 1.075rem;
  line-height: 1.7;
  color: var(--navy-soft);
}
.persona-list {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 1.3rem;
}
.persona-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.55rem;
  font-size: 1.075rem;
  line-height: 1.55;
  color: var(--navy-soft);
}
.persona-list li:last-child { margin-bottom: 0; }
.persona-list li strong {
  font-weight: 600;
  color: var(--navy);
}
.persona-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 12px;
  height: 1.5px;
  background: var(--navy);
  opacity: 0.45;
}

/* ---------- Portfolio ---------- */
.portfolio { background: var(--off-white-2); }
.portfolio-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
}

.product-card {
  position: relative;
  background: var(--off-white);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem 1.75rem;
  display: flex; flex-direction: column;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
  overflow: hidden;
}
.product-card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 4px;
  background: var(--product-accent, var(--navy));
  opacity: 0.9;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(29, 53, 87, 0.22);
}
.product-card--mathory    { --product-accent: #c8963e; }
.product-card--tasktastic { --product-accent: #4a90d9; }
.product-card--cruisecrew { --product-accent: #B01020; }

.product-icon {
  width: 72px; height: 72px;
  border-radius: 18px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.product-icon img { width: 100%; height: 100%; object-fit: cover; }
/* TaskTastic icon has a transparent background — wrap it in its brand blue */
.product-icon--tt { background: #4a90d9; }

.product-name {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--navy);
}
.product-tagline {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--product-accent, var(--navy));
  margin-top: 0.4rem;
  margin-bottom: 1rem;
}
.product-desc {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--navy-soft);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}
.product-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 500;
  color: var(--navy);
  align-self: flex-start;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color 0.2s var(--ease-out), gap 0.2s var(--ease-out);
}
.product-link span { transition: transform 0.25s var(--ease-out); }
.product-link:hover { color: var(--product-accent, var(--navy)); }
.product-link:hover span { transform: translateX(4px); }

/* ---------- Contact ---------- */
.contact { background: var(--off-white-2); text-align: center; }
.contact-inner { max-width: 720px; margin: 0 auto; }
.contact .label { text-align: center; }
.contact .section-heading { margin-bottom: 1.25rem; }
.contact-lede {
  font-size: 1.05rem;
  color: var(--navy-soft);
  line-height: 1.65;
  max-width: 52ch;
  margin: 0 auto 2.5rem;
}
.contact-methods {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
}
@media (min-width: 640px) {
  .contact-methods { grid-template-columns: repeat(2, 1fr); }
}
.contact-card {
  display: flex; flex-direction: column; align-items: flex-start;
  text-align: left;
  padding: 1.35rem 1.5rem;
  background: var(--off-white);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius-md);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.contact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(29, 53, 87, 0.22);
  box-shadow: var(--shadow-sm);
}
.contact-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--navy-mute);
  margin-bottom: 0.4rem;
}
.contact-value {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--navy);
  word-break: break-word;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 2.25rem 0;
  border-top: 1px solid var(--navy-line);
  background: var(--off-white);
}
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.footer-brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--navy);
}
.footer-mark { width: 28px; height: 28px; color: var(--navy); }
.footer-legal {
  font-size: 0.85rem;
  color: var(--navy-mute);
}
.footer-legal a {
  color: var(--navy-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(29, 53, 87, 0.25);
  transition: color 0.2s var(--ease-out), text-decoration-color 0.2s var(--ease-out);
  margin: 0 0.15rem;
}
.footer-legal a:hover { color: var(--navy); text-decoration-color: currentColor; }

/* ---------- Legal pages (privacy, terms) ---------- */
.legal-page { padding-block: clamp(3rem, 6vw, 5rem); }
.legal-page h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--navy);
  margin: 0 0 0.5rem;
}
.legal-page .updated {
  color: var(--navy-mute);
  font-size: 0.9rem;
  margin: 0 0 2rem;
}
.legal-page h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  margin: 2.25rem 0 0.6rem;
  color: var(--navy);
}
.legal-page p {
  max-width: 68ch;
  line-height: 1.7;
  color: var(--navy-soft);
  margin: 0 0 1rem;
}
.legal-page a {
  color: var(--navy);
  border-bottom: 1px solid var(--navy-line);
  transition: border-color 0.2s var(--ease-out);
}
.legal-page a:hover { border-bottom-color: var(--navy); }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--navy-mute) !important;
  border-bottom: none !important;
  margin-bottom: 2rem;
  transition: color 0.2s var(--ease-out), gap 0.2s var(--ease-out);
}
.back-link:hover { color: var(--navy) !important; }
.back-link:hover span { transform: translateX(-2px); }
.back-link span { transition: transform 0.2s var(--ease-out); }

/* ---------- Small-screen tweaks ---------- */
@media (max-width: 640px) {
  .site-nav { display: none; }
  .header-inner { min-height: 60px; }
  .hero { padding-top: 2rem; }
  .brand-caps { display: none; }
}

/* ---------- Motion respect ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  /* Static first frame for reduced-motion users; JS pauses the video */
  .prism-video { opacity: 1; }
}
