/* ==========================================================================
   Card District Phillip Island — Base Foundation
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Color — Surfaces */
  --color-ink: #12140F;
  --color-charcoal: #1C1F19;
  --color-charcoal-soft: #262A22;
  --color-felt: #0E3B2E;
  --color-felt-deep: #092A21;

  /* Color — Accent */
  --color-brass: #C9A227;
  --color-brass-bright: #E0BC4A;

  /* Color — Text */
  --color-bone: #F2EDE3;
  --color-bone-muted: #B9B2A4;

  /* Color — Lines & Status */
  --color-line: #3A3F34;
  --color-danger: #B4553F;

  /* Typography — Families */
  --font-heading: "Fraunces", serif;
  --font-body: "Inter", sans-serif;

  /* Typography — Scale */
  --text-display-size: clamp(2.5rem, 5vw + 1rem, 4rem);
  --text-display-line-height: 1.02;
  --text-display-letter-spacing: -0.02em;
  --text-display-weight: 400;

  --text-h1-size: clamp(2rem, 3.5vw + 0.75rem, 3rem);
  --text-h1-line-height: 1.08;
  --text-h1-letter-spacing: -0.015em;
  --text-h1-weight: 400;

  --text-h2-size: clamp(1.6rem, 2.5vw + 0.5rem, 2.125rem);
  --text-h2-line-height: 1.15;
  --text-h2-letter-spacing: -0.01em;
  --text-h2-weight: 400;

  --text-h3-size: 1.5rem;
  --text-h3-line-height: 1.25;
  --text-h3-letter-spacing: 0;
  --text-h3-weight: 600;

  --text-h4-size: 1.1875rem;
  --text-h4-line-height: 1.3;
  --text-h4-letter-spacing: 0;
  --text-h4-weight: 500;
  --text-h4-font-family: var(--font-body);

  --text-body-lg-size: 1.125rem;
  --text-body-lg-line-height: 1.6;
  --text-body-lg-letter-spacing: 0;
  --text-body-lg-weight: 400;

  --text-body-size: 1rem;
  --text-body-line-height: 1.65;
  --text-body-letter-spacing: 0;
  --text-body-weight: 400;

  --text-small-size: 0.875rem;
  --text-small-line-height: 1.5;
  --text-small-letter-spacing: 0;
  --text-small-weight: 400;

  --text-label-size: 0.75rem;
  --text-label-line-height: 1.4;
  --text-label-letter-spacing: 0.14em;
  --text-label-weight: 500;
  --text-label-text-transform: uppercase;

  --text-quote-size: clamp(1.4rem, 2vw + 0.5rem, 1.625rem);
  --text-quote-line-height: 1.4;
  --text-quote-letter-spacing: -0.01em;
  --text-quote-weight: 400;
  --text-quote-font-style: italic;

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Containers */
  --container-max: 75rem;
  --container-narrow-max: 45rem;
  --container-wide-max: 90rem;
  --container-padding-mobile: 1.5rem;
  --container-padding-tablet: 2.5rem;
  --container-padding-desktop: 4rem;

  /* Surfaces */
  --surface-ink: var(--color-ink);
  --surface-charcoal: var(--color-charcoal);
  --surface-charcoal-soft: var(--color-charcoal-soft);
  --surface-felt: var(--color-felt);
  --surface-felt-deep: var(--color-felt-deep);

  /* Borders */
  --border-hairline: 1px solid var(--color-line);
  --border-hairline-faint: 1px solid rgba(58, 63, 52, 0.6);

  /* Shadows */
  --shadow-dialog: 0 24px 48px rgba(0, 0, 0, 0.35);

  /* Corner Radius */
  --radius-0: 0px;
  --radius-1: 2px;
  --radius-2: 4px;
  --radius-3: 8px;

  /* Focus */
  --focus-outline-width: 2px;
  --focus-outline-offset: 2px;
  --focus-outline-color: var(--color-brass-bright);

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-base: 200ms ease-out;
  --transition-drawer: 250ms ease-out;
  --transition-reveal: 400ms ease-out;
}

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

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

body {
  min-height: 100vh;
  background-color: var(--surface-ink);
  color: var(--color-bone);
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  font-weight: var(--text-body-weight);
  line-height: var(--text-body-line-height);
  letter-spacing: var(--text-body-letter-spacing);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

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

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

/* --------------------------------------------------------------------------
   2. Document Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--text-h1-weight);
  color: var(--color-bone);
  line-height: 1.2;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-h1-size);
  line-height: var(--text-h1-line-height);
  letter-spacing: var(--text-h1-letter-spacing);
  font-weight: var(--text-h1-weight);
  margin-block-end: var(--space-5);
}

h2 {
  font-size: var(--text-h2-size);
  line-height: var(--text-h2-line-height);
  letter-spacing: var(--text-h2-letter-spacing);
  font-weight: var(--text-h2-weight);
  margin-block-end: var(--space-4);
}

h3 {
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line-height);
  letter-spacing: var(--text-h3-letter-spacing);
  font-weight: var(--text-h3-weight);
  margin-block-end: var(--space-3);
}

h4 {
  font-size: var(--text-h4-size);
  line-height: var(--text-h4-line-height);
  letter-spacing: var(--text-h4-letter-spacing);
  font-weight: var(--text-h4-weight);
  font-family: var(--text-h4-font-family);
  margin-block-end: var(--space-2);
}

p {
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  letter-spacing: var(--text-body-letter-spacing);
  font-weight: var(--text-body-weight);
  color: var(--color-bone);
  margin-block-end: var(--space-4);
}

p:last-child {
  margin-block-end: 0;
}

blockquote {
  font-family: var(--font-heading);
  font-size: var(--text-quote-size);
  line-height: var(--text-quote-line-height);
  letter-spacing: var(--text-quote-letter-spacing);
  font-weight: var(--text-quote-weight);
  font-style: var(--text-quote-font-style);
  color: var(--color-bone);
  margin-block-end: var(--space-5);
}

blockquote:last-child {
  margin-block-end: 0;
}

ul,
ol {
  margin-block-end: var(--space-4);
}

ul:last-child,
ol:last-child {
  margin-block-end: 0;
}

figure {
  margin-block-end: var(--space-5);
}

figure:last-child {
  margin-block-end: 0;
}

figcaption {
  font-size: var(--text-small-size);
  line-height: var(--text-small-line-height);
  color: var(--color-bone-muted);
  margin-block-start: var(--space-2);
}

small {
  font-size: var(--text-small-size);
  line-height: var(--text-small-line-height);
  color: var(--color-bone-muted);
}

strong {
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   3. Media Defaults
   -------------------------------------------------------------------------- */
img {
  border-radius: var(--radius-0);
}

/* --------------------------------------------------------------------------
   4. Form Defaults
   -------------------------------------------------------------------------- */
label {
  display: block;
  font-size: var(--text-label-size);
  line-height: var(--text-label-line-height);
  letter-spacing: var(--text-label-letter-spacing);
  font-weight: var(--text-label-weight);
  text-transform: var(--text-label-text-transform);
  color: var(--color-bone);
  margin-block-end: var(--space-2);
}

input,
textarea,
select {
  width: 100%;
  background-color: var(--surface-charcoal-soft);
  border: var(--border-hairline);
  border-radius: var(--radius-1);
  padding: var(--space-3) var(--space-4);
  color: var(--color-bone);
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-bone-muted);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-brass-bright);
  box-shadow: 0 0 0 var(--focus-outline-width) var(--color-brass-bright);
}

textarea {
  resize: vertical;
  min-height: 8rem;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23B9B2A4' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-inline-end: var(--space-8);
}

/* --------------------------------------------------------------------------
   5. Containers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding-mobile);
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide-max);
  margin-inline: auto;
  padding-inline: var(--container-padding-mobile);
}

@media (min-width: 768px) {
  .container,
  .container-narrow,
  .container-wide {
    padding-inline: var(--container-padding-tablet);
  }
}

@media (min-width: 1024px) {
  .container,
  .container-narrow,
  .container-wide {
    padding-inline: var(--container-padding-desktop);
  }
}

/* --------------------------------------------------------------------------
   6. Reusable Primitives
   -------------------------------------------------------------------------- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-1);
  font-family: var(--font-body);
  font-size: var(--text-label-size);
  line-height: var(--text-label-line-height);
  letter-spacing: 0.12em;
  font-weight: var(--text-label-weight);
  text-transform: uppercase;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: var(--focus-outline-width) solid var(--focus-outline-color);
  outline-offset: var(--focus-outline-offset);
}

.btn-primary {
  background-color: var(--color-brass);
  color: var(--color-ink);
  border: 1px solid var(--color-brass);
}

.btn-primary:hover {
  background-color: var(--color-brass-bright);
  border-color: var(--color-brass-bright);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-bone);
  border: 1px solid var(--color-bone);
}

.btn-secondary:hover {
  border-color: var(--color-brass);
  color: var(--color-brass);
}

.btn-tertiary {
  background-color: transparent;
  color: var(--color-brass);
  border: none;
  padding-inline: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn-tertiary:hover {
  color: var(--color-brass-bright);
}

/* Cards */
.card {
  background-color: var(--surface-charcoal-soft);
  border: var(--border-hairline);
  border-radius: var(--radius-2);
  padding: var(--space-4);
  transition: transform var(--transition-base), border-color var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 162, 39, 0.4);
}

.card > :last-child {
  margin-block-end: 0;
}

/* Section Header */
.section-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-block-end: var(--space-7);
}

.section-header .section-label {
  font-size: var(--text-label-size);
  line-height: var(--text-label-line-height);
  letter-spacing: var(--text-label-letter-spacing);
  font-weight: var(--text-label-weight);
  text-transform: var(--text-label-text-transform);
  color: var(--color-brass);
}

.section-header h2 {
  margin-block-end: 0;
}

/* Quote */
.quote {
  border-inline-start: 2px solid var(--color-brass);
  padding-inline-start: var(--space-5);
  font-family: var(--font-heading);
  font-size: var(--text-quote-size);
  line-height: var(--text-quote-line-height);
  letter-spacing: var(--text-quote-letter-spacing);
  font-weight: var(--text-quote-weight);
  font-style: var(--text-quote-font-style);
  color: var(--color-bone);
}

.quote .quote-attribution {
  display: block;
  margin-block-start: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-small-size);
  line-height: var(--text-small-line-height);
  font-style: normal;
  font-weight: var(--text-small-weight);
  color: var(--color-bone-muted);
}

/* Divider */
.divider {
  border: none;
  border-block-start: var(--border-hairline-faint);
  margin-block: var(--space-5);
}

/* Focus Ring (global) */
:focus-visible {
  outline: var(--focus-outline-width) solid var(--focus-outline-color);
  outline-offset: var(--focus-outline-offset);
}

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