/* ==========================================================================
   Sripati Gold — Base Stylesheet (shared)
   Design tokens, fonts, reset, typography & shared utilities.
   Load this on every page before page-specific CSS.
   ========================================================================== */

/* ------------------------------------------------------------------ *
 * 1. Fonts
 * Place font files in: assets/fonts/
 * (swap the src paths/formats to match the files you actually have)
 * ------------------------------------------------------------------ */
@font-face {
  font-family: "Beverly";
  /* Drop the Beverly font file into assets/fonts/ as any one of these. */
  src: url("../fonts/Beverly.woff2") format("woff2"),
       url("../fonts/Beverly.woff")  format("woff"),
       url("../fonts/Beverly.ttf")   format("truetype"),
       url("../fonts/Beverly.otf")   format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gilroy";
  src: url("../fonts/Gilroy-Regular.woff2") format("woff2"),
       url("../fonts/Gilroy-Regular.woff")  format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("../fonts/Gilroy-Medium.woff2") format("woff2"),
       url("../fonts/Gilroy-Medium.woff")  format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("../fonts/Gilroy-SemiBold.woff2") format("woff2"),
       url("../fonts/Gilroy-SemiBold.woff")  format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("../fonts/Gilroy-Bold.woff2") format("woff2"),
       url("../fonts/Gilroy-Bold.woff")  format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-Light.woff2") format("woff2"),
       url("../fonts/Gotham-Light.woff")  format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ *
 * 2. Design tokens (CSS custom properties)
 * ------------------------------------------------------------------ */
:root {
  /* --- Brand colours --- */
  --color-brown:      #2C1D0D;  /* primary dark / text on light         */
  --color-gold:       #FFA900;  /* accent / CTA / highlights            */
  --color-gold-soft:  #FFE7B7;  /* soft gold surfaces, cards, dividers  */
  --color-cream:      #F8F7F3;  /* page background                      */
  --color-white:      #FFFFFF;
  --color-black:      #000000;

  /* --- Semantic aliases --- */
  --bg-page:          var(--color-cream);
  --bg-dark:          var(--color-brown);
  --text-body:        var(--color-brown);
  --text-invert:      var(--color-cream);
  --accent:           var(--color-gold);
  --surface-soft:     var(--color-gold-soft);
  --border-soft:      rgba(44, 29, 13, 0.12);

  /* Gold gradient (as shown in the brand swatch: gold -> soft gold) */
  --gradient-gold: linear-gradient(180deg, var(--color-gold) 0%, var(--color-gold-soft) 100%);

  /* --- Font families --- */
  --font-display: "Beverly", "Times New Roman", serif;   /* headings   */
  --font-body:    "Gilroy", "Helvetica Neue", Arial, sans-serif; /* body */
  --font-alt:     "Gotham", "Gilroy", Arial, sans-serif; /* light UI text, cards */

  /* --- Font weights (Gilroy) --- */
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  /* --- Type scale (desktop, px as rem) --- */
  /* Hero */
  --fs-hero:           6.5625rem; /* 105 - home hero & Contact page      */
  --fs-hero-alt:       4.125rem;  /*  66 - hero on other pages           */
  --fs-hero-sub:       1.75rem;   /*  28 - hero subheading               */

  /* Headings */
  --fs-h1:             6.0625rem; /*  97 */
  --fs-h2:             5.9375rem; /*  95 */
  --fs-h3:             4.875rem;  /*  78 */
  --fs-h4:             4.5rem;    /*  72 */
  --fs-h5:             3.875rem;  /*  62 */
  --fs-h6:             1.9375rem; /*  31 */

  /* Sub-headings / section labels */
  --fs-sub-lg:         2rem;      /*  32 */
  --fs-sub:            1.875rem;  /*  30 */
  --fs-sub-sm:         1.75rem;   /*  28 */
  --fs-sub-xs:         1.625rem;  /*  26 */
  --fs-sub-2xs:        1.5rem;    /*  24 */

  /* Body */
  --fs-body:           1rem;      /*  16 */
  --fs-small:          0.875rem;  /*  14 */

  /* --- Line heights --- */
  --lh-tight:   1.05;
  --lh-heading: 1.15;
  --lh-body:    1.6;

  /* --- Spacing scale --- */
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-24:  6rem;

  /* --- Layout --- */
  --container-max: 1280px;
  --container-pad: 1.5rem;
  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  24px;
  --radius-pill: 999px;

  /* --- Effects --- */
  --shadow-sm: 0 1px 3px rgba(44, 29, 13, 0.08);
  --shadow:    0 8px 24px rgba(44, 29, 13, 0.12);
  --transition: 0.25s ease;
}

/* ------------------------------------------------------------------ *
 * 3. Reset / normalize
 * ------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--text-body);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

ul, ol { list-style: none; padding: 0; }

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

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

/* ------------------------------------------------------------------ *
 * 4. Typography defaults
 * ------------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  line-height: var(--lh-heading);
  color: var(--text-body);
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-tight); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-h5); }
h6 { font-size: var(--fs-h6); }

p { max-width: 65ch; }

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

.section { padding-block: var(--space-24); }

/* Hero type helpers */
.hero-title     { font-family: var(--font-display); font-size: var(--fs-hero);     line-height: var(--lh-tight); }
.hero-title--alt{ font-family: var(--font-display); font-size: var(--fs-hero-alt); line-height: var(--lh-tight); }
.hero-subtitle  { font-family: var(--font-body);    font-size: var(--fs-hero-sub); font-weight: var(--fw-medium); }

/* Colour helpers */
.bg-dark   { background-color: var(--bg-dark);    color: var(--text-invert); }
.bg-cream  { background-color: var(--bg-page); }
.bg-soft   { background-color: var(--surface-soft); }
.bg-gold-gradient { background: var(--gradient-gold); }
.text-gold { color: var(--accent); }
.text-invert { color: var(--text-invert); }

.on-dark h1, .on-dark h2, .on-dark h3,
.on-dark h4, .on-dark h5, .on-dark h6 { color: var(--text-invert); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-body);
  padding: 0.85em 1.75em;
  border-radius: var(--radius-pill);
  transition: background-color var(--transition), color var(--transition), transform var(--transition);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background-color: var(--accent);
  color: var(--color-brown);
}
.btn--primary:hover { background-color: #e69800; }

.btn--dark {
  background-color: var(--color-brown);
  color: var(--color-cream);
}
.btn--dark:hover { background-color: #3d2a13; }

.btn--outline {
  border: 1.5px solid currentColor;
}

/* Accessibility helper */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ *
 * 6. Responsive — fluid down-scale of the display scale
 * ------------------------------------------------------------------ */
@media (max-width: 1024px) {
  :root {
    --fs-hero:     4.5rem;   /* ~72 */
    --fs-hero-alt: 3.25rem;  /* ~52 */
    --fs-h1: 4rem;  --fs-h2: 3.75rem; --fs-h3: 3.25rem;
    --fs-h4: 2.75rem; --fs-h5: 2.375rem; --fs-h6: 1.625rem;
    --space-24: 4rem;
  }
}

@media (max-width: 640px) {
  :root {
    --fs-hero:     2.75rem;  /* ~44 */
    --fs-hero-alt: 2.25rem;  /* ~36 */
    --fs-hero-sub: 1.25rem;  /* ~20 */
    --fs-h1: 2.5rem; --fs-h2: 2.25rem; --fs-h3: 2rem;
    --fs-h4: 1.75rem; --fs-h5: 1.5rem; --fs-h6: 1.375rem;
    --fs-sub-lg: 1.5rem; --fs-sub: 1.375rem; --fs-sub-sm: 1.25rem;
    --container-pad: 1rem;
    --space-24: 3rem;
  }
}
