@import "./tokens.css";

/* ==========================================================================
   Font Faces
   ========================================================================== */

/* Angst Serif (Official Earthenic Brand Wordmark & Display Headings) */
@font-face {
  font-family: 'Angst Serif';
  src: url('/fonts/Angst-NormalSerif.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Angst Serif';
  src: url('/fonts/Angst-BoldSerif.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Angst variable font (Wordmark & Display Headings fallback) */
@font-face {
  font-family: 'Angst';
  src: url('/fonts/angst.woff2') format('woff2'),
       url('/fonts/AngstVF.ttf') format('truetype');
  font-weight: 1 1000;
  font-style: normal;
  font-display: swap;
}

/* Newsreader (Editorial headlines, body copy, and prices with ₹) */
@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader-latin-ext.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Note: Strict Brand Rule — Zero Italics. All typography is stately, upright and noble */

/* Instrument Sans (UI, buttons, forms, metadata) */
@font-face {
  font-family: 'Instrument Sans';
  src: url('/fonts/instrument-sans-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Sans';
  src: url('/fonts/instrument-sans-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ==========================================================================
   New Hero Thin (Tier 03 Statement Typography — Visual Identity PDF Page 35 & 38)
   ========================================================================== */
@font-face {
  font-family: 'New Hero Thin';
  src: url('/fonts/NewHero-Thin.otf') format('opentype'),
       url('/fonts/NewHero-Thin.woff2') format('woff2'),
       local('New Hero Thin'),
       url('/fonts/SuisseIntlTrial-Thin.otf') format('opentype');
  font-weight: 100 200;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Suisse International (Tier 04 Body & Reading Typography — PDF Page 36 & 38)
   ========================================================================== */
@font-face {
  font-family: 'Suisse Intl';
  src: url('/fonts/SuisseIntlTrial-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Suisse Intl';
  src: url('/fonts/SuisseIntlTrial-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Suisse Intl';
  src: url('/fonts/SuisseIntlTrial-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Suisse Intl';
  src: url('/fonts/SuisseIntlTrial-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Suisse Intl Thin';
  src: url('/fonts/SuisseIntlTrial-Thin.otf') format('opentype');
  font-weight: 100 200;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   CSS Reset & Base Rules
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important; /* Brand requirement: border-radius 0 everywhere */
}

/* Strict Zero-Italics Rule across entire institution */
i, em, cite, dfn, var, address, blockquote, q {
  font-style: normal !important;
}

html {
  font-size: 16px;
  background-color: var(--archive-white);
  color: var(--institution-black);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  font-family: var(--font-text);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--institution-black);
  background-color: var(--archive-white);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

html.menu-locked,
body.menu-locked {
  overflow: hidden !important;
  touch-action: none;
}

/* Focus styles (Section 12.3: 2px aged-brass, 3px offset) */
:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color) !important;
  outline-offset: var(--focus-ring-offset) !important;
}

/* Skip to content link for accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--institution-black);
  color: var(--archive-white);
  padding: 12px 24px;
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  z-index: 99999;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 20px;
}

/* Typography Utility Classes */
.wordmark {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.display-xl {
  font-family: var(--font-display);
  font-size: var(--text-display-xl);
  line-height: var(--lh-tight);
  text-transform: none;
  font-weight: 400;
  letter-spacing: -0.015em;
  font-style: normal;
  max-width: 18em;
}

.display-l {
  font-family: var(--font-display);
  font-size: var(--text-display-l);
  line-height: var(--lh-tight);
  text-transform: none;
  font-weight: 400;
  letter-spacing: -0.01em;
  font-style: normal;
}

.display-m {
  font-family: var(--font-display);
  font-size: var(--text-display-m);
  line-height: var(--lh-heading);
  letter-spacing: -0.005em;
  font-weight: 400;
  font-style: normal;
}

.editorial-heading {
  font-family: var(--font-display);
  font-size: var(--text-heading-editorial);
  line-height: var(--lh-heading);
  letter-spacing: -0.005em;
  font-weight: 400;
  font-style: normal;
}

/* Tier 03: Statement Typography (Suisse Intl Thin / New Hero Thin — Visual Identity PDF Page 30, 32, 35 & 38) */
.display-statement,
.statement-text,
.brand-pullquote,
.philosophy-statement-text {
  font-family: var(--font-statement) !important;
  font-weight: 100 !important;
  font-style: normal !important;
  letter-spacing: 0.005em;
  line-height: var(--lh-editorial);
}

.lede {
  font-family: var(--font-body);
  font-size: var(--text-lede);
  line-height: 1.6;
  color: var(--stone);
}

.price {
  font-family: var(--font-serif) !important;
  font-weight: 400;
}

/* Common UI Elements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 14px 32px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.3s cubic-bezier(0.25, 1, 0.5, 1),
              color 0.3s cubic-bezier(0.25, 1, 0.5, 1),
              border-color 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--institution-black);
  color: var(--archive-white);
  border-color: var(--institution-black);
}

.btn-primary:hover {
  background-color: #26221D; /* Warm ultra-deep charcoal tone */
  color: var(--archive-white);
  border-color: #26221D;
}

.btn-secondary {
  background-color: transparent;
  color: var(--institution-black);
  border-color: var(--institution-black);
}

.btn-secondary:hover {
  background-color: var(--institution-black);
  color: var(--archive-white);
}

.editorial-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--institution-black);
  text-decoration: none;
  border-bottom: 1px solid var(--institution-black);
  padding-bottom: 3px;
  transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
}

.editorial-link:hover {
  opacity: 0.7;
}

.editorial-link .arrow {
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.editorial-link:hover .arrow {
  transform: translateX(3px);
}

.text-link {
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  color: var(--institution-black);
  text-decoration: underline;
  text-underline-offset: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity var(--transition-fast);
}

.text-link:hover {
  opacity: 0.7;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.hairline-divider {
  width: 100%;
  height: 1px;
  background-color: var(--hairline);
  border: none;
  margin: 0;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
