/* ==========================================================
DESIGN TOKENS & GLOBAL STYLES FOR AMARINE
========================================================== */

/* ==========================================================
CSS VARIABLES & DESIGN SYSTEM
========================================================== */

:root {
  /* Color palette */
  --teal: #1A4853;
  --teal-dark: #0F3640;
  --teal-light: #2C6975;
  --ivory: #FAFAF7;
  --ivory-warm: #F5F1E8;
  --gold: #B8935E;
  --gold-soft: #C9A878;
  --charcoal: #1F2937;
  --graphite: #374151;
  --mute: #6B7280;
  --rule: #D7D2C7;
  --rule-soft: #E8E4D8;

  /* Typography system */
  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans: "Inter", "Söhne", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;

  /* ==========================================================
    SPACING SCALE
  ========================================================== */

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;

  /* Medium spacing */
  --s-5: clamp(20px, 1.5vw, 24px);
  --s-6: clamp(24px, 2vw, 32px);

  /* Large spacing */
  --s-7: clamp(32px, 3vw, 48px);
  --s-8: clamp(48px, 4vw, 64px);
  --s-9: clamp(64px, 6vw, 96px);
  --s-10: clamp(80px, 8vw, 128px);
  --s-11: clamp(120px, 12vw, 192px);

  /* ==========================================================
    LAYOUT
  ========================================================== */

  --gutter: clamp(24px, 3vw, 80px);
  --gutter-lg: clamp(64px, 8vw, 128px);

  --max: 1440px;

  /* ==========================================================
    TYPOGRAPHY
  ========================================================== */

  --display-xl: clamp(64px, 8vw, 112px);
  --display: clamp(48px, 5.6vw, 72px);

  --h1: clamp(36px, 3.6vw, 48px);
  --h2: clamp(26px, 2.4vw, 32px);
  --h3: clamp(20px, 1.6vw, 22px);

  --body: clamp(16px, 1vw, 17px);
  --body-lg: clamp(17px, 1.2vw, 19px);

  --small: 14px;
  --eyebrow: 0.65rem;

  /* ==========================================================
    MOTION & EASING
  ========================================================== */
  --ease: cubic-bezier(.2, .6, .2, 1);
  --t-fast: 200ms;
  --t-base: 400ms;
  --t-slow: 800ms;
}

/* ==========================================================
RESET & BASE STYLES
========================================================== */

* { box-sizing: border-box; }

html, body { 
  margin: 0; 
  padding: 0; 
}

body {
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: var(--body);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

/* ==========================================================
TYPOGRAPHY
========================================================== */

/* Font family primitives */
.serif { 
  font-family: var(--serif); 
  font-weight: 400; 
  letter-spacing: -0.005em; 
}

.serif-italic { 
  font-family: var(--serif); 
  font-style: italic; 
  font-weight: 400; 
}

.sans { 
  font-family: var(--sans); 
}

/* Display and heading scales */
.display-xl { 
  font-family: var(--serif); 
  font-size: var(--display-xl); 
  line-height: 0.95; 
  letter-spacing: -0.015em; 
  font-weight: 400; 
}

.display { 
  font-family: var(--serif); 
  font-size: var(--display); 
  line-height: 1.02; 
  letter-spacing: -0.01em; 
  font-weight: 400; 
}

.h1 { 
  font-family: var(--serif); 
  font-size: var(--h1); 
  line-height: 1.1; 
  font-weight: 400; 
}

.h2 { 
  font-family: var(--serif); 
  font-size: var(--h2); 
  line-height: 1.2; 
  font-weight: 400; 
}

.h3 { 
  font-family: var(--serif); 
  font-size: var(--h3); 
  line-height: 1.3; 
  font-weight: 500; 
}

/* Eyebrow / label style */
.eyebrow {
  font-family: var(--sans);
  font-size: var(--eyebrow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--graphite);
  font-weight: 500;
}

.eyebrow.on-dark { 
  color: var(--gold); 
}

/* Paragraph and body copy */
p { 
  margin: 0 0 var(--s-5); 
  max-width: 62ch; 
}

p.lead { 
  font-size: var(--body-lg); 
  color: var(--graphite); 
}

/* Numeric accent style */
.numeral {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.15em;
}

.mark-num {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.25em;
  color: var(--gold);
  font-style: italic;
}

/* ==========================================================
LAYOUT PRIMITIVES
========================================================== */

.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

@media (max-width: 900px) {
  .shell { 
    padding-left: 24px; 
    padding-right: 24px; 
  }
}

.section {
  padding-top: var(--s-10);
  padding-bottom: var(--s-10);
}

.section-lg {
  padding-top: var(--s-11);
  padding-bottom: var(--s-11);
}

@media (max-width: 900px) {
  .section { 
    padding-top: var(--s-9); 
    padding-bottom: var(--s-9); 
  }
  
  .section-lg { 
    padding-top: var(--s-10); 
    padding-bottom: var(--s-10); 
  }
}

/* Section header pattern */
.sec-head { 
  display: grid; 
  grid-template-columns: 200px 1fr; 
  gap: var(--s-7); 
  align-items: start; 
  margin-bottom: var(--s-8); 
}

.sec-head .label { 
  display: flex; 
  flex-direction: column; 
  gap: var(--s-3); 
}

@media (max-width: 900px) {
  .sec-head { 
    grid-template-columns: 1fr; 
    gap: var(--s-4); 
  }
}

/* ==========================================================
SURFACES & BACKGROUNDS
========================================================== */

/* Hairline borders */
.hairline { 
  border: 0; 
  height: 1px; 
  background: var(--rule); 
  margin: 0; 
}

.hairline-gold { 
  border: 0; 
  height: 1px; 
  background: var(--gold); 
  margin: 0; 
}

/* Teal surface theme */
.surface-teal { 
  background: var(--teal); 
  color: var(--ivory); 
}

.surface-teal hr.hairline { 
  background: rgba(184, 147, 94, 0.4); 
}

.surface-teal .eyebrow { 
  color: var(--gold); 
}

.surface-teal p { 
  color: rgba(250, 250, 247, 0.85); 
}

/* Ivory surface themes */
.surface-ivory { 
  background: var(--ivory); 
  color: var(--charcoal); 
}

.surface-ivory-warm { 
  background: var(--ivory-warm); 
  color: var(--charcoal); 
}

/* ==========================================================
BUTTONS & LINKS
========================================================== */

/* Base button style */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 18px 28px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: all var(--t-base) var(--ease);
  text-decoration: none;
}

.btn:hover { 
  background: currentColor; 
  color: var(--ivory);
}

/* Primary button variant */
.btn-primary {
  background: var(--teal);
  color: var(--ivory);
  border-color: var(--teal);
}

.btn-primary:hover { 
  background: var(--teal-dark); 
  border-color: var(--teal-dark); 
}

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

.btn-secondary:hover { 
  color: var(--ivory);
  background-color: var(--gold); 
}

/* Button arrow animation */
.btn .arrow { 
  display: inline-block; 
  transition: transform var(--t-base) var(--ease); 
}

.btn:hover .arrow { 
  transform: translateX(4px); 
}

/* Teal surface button override */
.surface-teal .btn:hover { 
  background: var(--gold); 
  border-color: var(--gold); 
  color: var(--teal); 
}

/* Link with arrow accent */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  mix-blend-mode: difference;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
  opacity: 0.75;
  transition: border-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}

.link-arrow:hover { 
  border-color: var(--gold);
  mix-blend-mode: hard-light;
  opacity: 1;
}

/* Teal surface link variations */
.surface-teal .link-arrow { 
  color: var(--ivory); 
  border-color: rgba(250,250,247,0.3); 
}

.surface-teal .link-arrow:hover { 
  color: var(--gold); 
  border-color: var(--gold); 
}

/* ==========================================================
PHOTO PLACEHOLDERS
========================================================== */

.ph {
  position: relative;
  background-color: var(--ivory-warm);
  background-size: cover;
  background-position: center;
  color: var(--teal);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

/* Dark variant for photos */
.ph.dark {
  background-color: var(--teal-dark);
  color: var(--gold);
}

/* No-image placeholder pattern */
.ph.no-img {
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(26, 72, 83, 0.06) 0px,
      rgba(26, 72, 83, 0.06) 1px,
      transparent 1px,
      transparent 14px
    );
}

/* Photo scrim overlay */
.ph::before {
  content: "";
  position: absolute; 
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15, 54, 64, 0.55) 100%);
  pointer-events: none;
  opacity: 0.7;
}

/* Photo label overlay */
.ph::after {
  content: attr(data-label);
  position: relative;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 14px 16px;
  color: var(--ivory);
  z-index: 2;
  opacity: 0.92;
}

/* ==========================================================
ANIMATIONS & TRANSITIONS
========================================================== */

/* Reveal — micro fade-in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ==========================================================
UTILITY CLASSES
========================================================== */

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

.center { 
  text-align: center; 
}

.measure { 
  max-width: 62ch; 
}

.measure-narrow { 
  max-width: 48ch; 
}
