/* ==========================================================================
   sensory.design — Shared Design System
   A dark, typography-forward aesthetic for an authoritative resource
   on sensory design as a discipline.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Custom Properties
   -------------------------------------------------------------------------- */

:root {
  /* Palette — warm darks, cream lights, muted copper accent */
  --color-bg:            #1a1714;
  --color-bg-elevated:   #211e1a;
  --color-bg-surface:    #2a2520;
  --color-bg-hero:       #141210;

  --color-text:          #e8e0d4;
  --color-text-muted:    #a89e90;
  --color-text-faint:    #7a7168;

  --color-accent:        #c8956a;
  --color-accent-hover:  #d9a87d;
  --color-accent-faint:  rgba(200, 149, 106, 0.12);

  --color-border:        #3a3530;
  --color-border-light:  #4a4540;

  /* Typography */
  --font-heading:  "Cormorant Garamond", "Georgia", serif;
  --font-body:     "DM Sans", "Helvetica Neue", Arial, sans-serif;

  --text-xs:   0.8125rem;   /* 13px */
  --text-sm:   0.875rem;    /* 14px */
  --text-base: 1.0625rem;   /* 17px */
  --text-lg:   1.1875rem;   /* 19px */
  --text-xl:   1.5rem;      /* 24px */
  --text-2xl:  2rem;         /* 32px */
  --text-3xl:  2.75rem;      /* 44px */
  --text-4xl:  3.5rem;       /* 56px */
  --text-hero: clamp(2.75rem, 5.5vw, 4.5rem);

  --leading-tight:  1.2;
  --leading-snug:   1.35;
  --leading-normal: 1.7;

  --weight-normal:    400;
  --weight-medium:    500;
  --weight-semibold:  600;
  --weight-bold:      700;

  /* Spacing scale */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   1.5rem;
  --space-lg:   2.5rem;
  --space-xl:   4rem;
  --space-2xl:  6rem;
  --space-3xl:  9rem;

  /* Layout */
  --content-width:  72rem;  /* ~1152px — spacious outer container */
  --content-narrow: 54rem;  /* ~864px — comfortable reading */
  --content-reading: 42em;  /* ~672px — body text max for readability */
  --content-pad:    clamp(1.25rem, 5vw, 3rem);

  /* Transitions */
  --ease-out:     cubic-bezier(0.25, 0, 0.25, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 500ms;

  /* Borders */
  --radius-sm: 3px;
  --radius-md: 6px;
}


/* --------------------------------------------------------------------------
   2. Reset / Base
   -------------------------------------------------------------------------- */

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

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

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover,
a:focus-visible {
  color: var(--color-accent-hover);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection {
  background-color: var(--color-accent);
  color: var(--color-bg);
}


/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-normal);
  line-height: var(--leading-tight);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--text-hero);
  line-height: 1.1;
}

h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}

h4 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: var(--weight-semibold);
}

em {
  font-style: italic;
}

blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-md);
  margin: var(--space-lg) 0;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  color: var(--color-text-muted);
  font-style: italic;
}

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
}

.label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}


/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */

.content-wrapper {
  width: 100%;
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--content-pad);
  padding-right: var(--content-pad);
}

.content-narrow {
  max-width: var(--content-narrow);
}

main {
  flex: 1;
}


/* --------------------------------------------------------------------------
   5. Navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(26, 23, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .content-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.site-brand {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--color-text);
  text-decoration: none;
}

.site-brand:hover {
  color: var(--color-accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.site-nav a {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-xs) 0;
  position: relative;
  transition: color var(--duration-fast) var(--ease-out);
}

.site-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-accent);
  transition: width var(--duration-base) var(--ease-out);
}

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

.site-nav a:hover::after {
  width: 100%;
}

.site-nav a[aria-current="page"] {
  color: var(--color-text);
}

.site-nav a[aria-current="page"]::after {
  width: 100%;
}

/* Mobile nav toggle — hidden by default, used on small screens */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: var(--space-xs);
  line-height: 1;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}


/* --------------------------------------------------------------------------
   6. Hero Sections
   -------------------------------------------------------------------------- */

.hero {
  padding: var(--space-3xl) 0 var(--space-2xl);
  background-color: var(--color-bg-hero);
  border-bottom: 1px solid var(--color-border);
}

.hero h1 {
  margin-bottom: var(--space-lg);
}

.hero .lead {
  max-width: 40em;
}

/* Home page hero — extra dramatic */
.hero--home {
  padding: var(--space-3xl) 0;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero--home h1 {
  max-width: 16em;
  margin-bottom: var(--space-lg);
}


/* --------------------------------------------------------------------------
   7. Sections
   -------------------------------------------------------------------------- */

.section {
  padding: var(--space-2xl) 0;
}

.section + .section {
  border-top: 1px solid var(--color-border);
}

.section__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.section__title {
  margin-bottom: var(--space-lg);
}

.section__body {
  max-width: var(--content-reading);
}

.section__body p + p {
  margin-top: var(--space-md);
}


/* --------------------------------------------------------------------------
   8. Sense Cards (The Senses page)
   -------------------------------------------------------------------------- */

.sense-block {
  padding: var(--space-2xl) 0;
}

.sense-block + .sense-block {
  border-top: 1px solid var(--color-border);
}

.sense-block__icon {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.sense-block h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
}

.sense-block .lead {
  margin-bottom: var(--space-lg);
}


/* --------------------------------------------------------------------------
   9. Journal Entries
   -------------------------------------------------------------------------- */

.journal-list {
  list-style: none;
}

.journal-entry {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--color-border);
}

.journal-entry:first-child {
  padding-top: 0;
}

.journal-entry__date {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.journal-entry__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}

.journal-entry__title a {
  color: var(--color-text);
  text-decoration: none;
}

.journal-entry__title a:hover {
  color: var(--color-accent);
}

.journal-entry__excerpt {
  color: var(--color-text-muted);
  max-width: var(--content-reading);
}


/* --------------------------------------------------------------------------
   10. CTA / Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  padding: 0.75em 1.75em;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  color: var(--color-accent);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.btn:hover,
.btn:focus-visible {
  background-color: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}

.cta-section {
  padding: var(--space-2xl) 0 var(--space-3xl);
  text-align: center;
}

.cta-section h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}

.cta-section p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  max-width: 32em;
  margin-left: auto;
  margin-right: auto;
}


/* --------------------------------------------------------------------------
   11. Contact Section (About page)
   -------------------------------------------------------------------------- */

.contact {
  padding: var(--space-2xl) 0 var(--space-3xl);
  border-top: 1px solid var(--color-border);
}

.contact h2 {
  margin-bottom: var(--space-sm);
}

.contact p {
  color: var(--color-text-muted);
  max-width: 36em;
}

.contact .btn {
  margin-top: var(--space-md);
}


/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
}

.site-footer .content-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.site-footer__attribution {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
}

.site-footer__attribution a {
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition:
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.site-footer__attribution a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.site-footer__links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.site-footer__links a {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
}

.site-footer__links a:hover {
  color: var(--color-text-muted);
}


/* --------------------------------------------------------------------------
   13. Utility Classes
   -------------------------------------------------------------------------- */

.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;
}

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

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

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }


/* --------------------------------------------------------------------------
   14. Responsive
   -------------------------------------------------------------------------- */

/* Small screens (max 640px) */
@media (max-width: 40em) {
  :root {
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
  }

  .site-header .content-wrapper {
    height: 3.5rem;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background-color: rgba(26, 23, 20, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-sm) var(--content-pad);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: var(--space-sm) 0;
    font-size: var(--text-base);
  }

  .site-nav a::after {
    display: none;
  }

  .hero {
    padding: var(--space-2xl) 0 var(--space-xl);
  }

  .hero--home {
    padding: var(--space-2xl) 0;
    min-height: 55vh;
  }

  .section {
    padding: var(--space-xl) 0;
  }

  .sense-block {
    padding: var(--space-xl) 0;
  }

  h2 {
    font-size: var(--text-2xl);
  }

  .site-footer .content-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Medium screens (641px - 1024px) */
@media (min-width: 40.0625em) and (max-width: 64em) {
  .hero--home {
    min-height: 60vh;
  }
}

/* Large screens */
@media (min-width: 64.0625em) {
  .hero--home h1 {
    font-size: var(--text-4xl);
  }
}
