/* ==========================================================================
   JEWEL DESIGN STUDIO — ELEMENTS (Layer 2)
   Typography scale, buttons, dividers, tags.
   Every element references Layer 1 tokens.
   ========================================================================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--colour-text-body);
  background-color: var(--colour-background);
  line-height: 1.7;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ---- Typography Scale ---- */

.h1, h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 72px;
  line-height: 1.05;
  color: var(--colour-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.h2, h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 48px;
  line-height: 1.1;
  color: var(--colour-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.h3, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 32px;
  line-height: 1.3;
  color: var(--colour-primary);
}

.h4, h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.4;
  color: var(--colour-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.body-lg {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.7;
  color: var(--colour-text-body);
}

.body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--colour-text-body);
}

.caption {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--colour-primary);
}

.pull-quote {
  font-family: var(--font-serif);
  font-weight: 500;
  font-style: italic;
  font-size: 28px;
  line-height: 1.4;
  color: var(--colour-accent-1);
}

p + p {
  margin-top: 1.2em;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 32px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--border-radius);
  cursor: pointer;
  border: none;
  transition: background-color var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast),
              opacity var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  opacity: 0.88;
}

.btn-primary {
  background-color: var(--colour-primary);
  color: var(--colour-background);
}

.btn-primary:hover {
  background-color: var(--colour-background-deep);
}

.btn-secondary {
  background-color: transparent;
  color: var(--colour-primary);
  border: 1.5px solid var(--colour-primary);
}

.btn-secondary:hover {
  background-color: var(--colour-primary);
  color: var(--colour-background);
}

.btn-inverted {
  background-color: var(--colour-background);
  color: var(--colour-primary);
}

.btn-inverted:hover {
  background-color: var(--colour-background);
}

.btn-secondary-inverted {
  background-color: transparent;
  color: var(--colour-background);
  border: 1.5px solid var(--colour-background);
}

.btn-secondary-inverted:hover {
  background-color: rgba(242, 234, 224, 0.15);
}

.btn-text {
  background: none;
  border: none;
  color: var(--colour-primary);
  padding: 0;
  height: auto;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.btn-text::after {
  content: ' →';
}

.btn-text:hover {
  text-decoration: underline;
}

/* ---- Dividers ---- */

.divider-thick {
  border: none;
  height: 4px;
  background-color: var(--colour-divider);
  width: 100%;
}

.divider-thin {
  border: none;
  height: 1px;
  background-color: var(--colour-divider);
  opacity: 0.2;
  width: 100%;
}

/* ---- Focus Styles ---- */

*:focus-visible {
  outline: 2px solid var(--colour-focus);
  outline-offset: 2px;
}

.btn:focus-visible {
  outline: 2px solid var(--colour-focus);
  outline-offset: 3px;
}

/* ---- Responsive Typography ---- */

@media (max-width: 1279px) {
  .h1, h1 { font-size: 56px; }
  .h2, h2 { font-size: 40px; }
  .h3, h3 { font-size: 28px; }
  .pull-quote { font-size: 24px; }
}

@media (max-width: 767px) {
  .h1, h1 { font-size: 44px; }
  .h2, h2 { font-size: 36px; }
  .h3, h3 { font-size: 26px; }
  .h4, h4 { font-size: 16px; }
  .body-lg { font-size: 17px; }
  .body { font-size: 16px; }
  .caption { font-size: 12px; }
  .pull-quote { font-size: 22px; }
}

/* ---- Reduced Motion ---- */
@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;
  }
}
