/* ============================================================
   Altrim Capital Services — stylesheet
   Sizes follow the brief exactly on desktop:
     company name 50 · tagline 20 · nav 25 · section headers 33 · body 25
   (scaled down only on small phones so nothing overflows)
   Palette: white background · black text · golden headings ·
   light-golden-yellow company name
   ============================================================ */

:root {
  --name-gold:  #e3b23c;   /* light golden yellow — company name */
  --gold:       #c7981c;   /* golden — section headers */
  --gold-deep:  #a5811a;
  --gold-light: #eccb6a;
  --ink:        #141414;   /* black text */
  --ink-soft:   #333;
  --muted:      #6b6b6b;
  --bg:         #ffffff;
  --bg-alt:     #faf7f0;
  --line:       #ecdfbf;
  --card:       #ffffff;
  --shadow:     0 10px 30px rgba(40, 32, 8, .10);
  --shadow-sm:  0 4px 14px rgba(40, 32, 8, .07);
  --radius:     14px;
  --maxw:       1200px;

  /* exact sizes from the brief (desktop) */
  --sz-name:    50px;
  --sz-tagline: 20px;
  --sz-nav:     25px;
  --sz-head:    33px;
  --sz-body:    25px;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 150px; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;               /* safety: never allow sideways scroll */
  -webkit-text-size-adjust: 100%;   /* stop iOS auto-inflating text */
}
img { max-width: 100%; display: block; }
a { color: var(--gold-deep); text-decoration: none; }
a:hover { color: var(--gold); }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ============================================================
   HEADER  — name top-right, tagline below, nav beside
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);          /* solid — no content bleeds through when scrolling */
  border-bottom: 2px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 16px 0;
}

/* brand block, pinned to the top-right */
.brand { order: 3; text-align: right; display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-family: var(--serif);
  color: var(--name-gold);
  font-weight: 800;
  font-size: var(--sz-name);        /* 50 */
  letter-spacing: .4px;
}
.brand-tagline {
  color: var(--ink);                /* black */
  font-size: var(--sz-tagline);     /* 20 */
  font-weight: 500;
  margin-top: 4px;
}

/* navigation, beside the heading — kept on a single line */
.primary-nav { order: 2; display: flex; flex-wrap: nowrap; align-items: center; gap: 0 2px; }
.nav-link {
  color: var(--ink);                /* black text */
  font-size: clamp(.8rem, 1.15vw, 1.06rem);  /* sized to fit all links on one row */
  font-weight: 600;
  padding: 7px 9px;
  border-radius: 8px;
  position: relative;
  white-space: nowrap;
}
.nav-link::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.nav-link:hover, .nav-link.active { color: var(--gold-deep); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

.nav-toggle {
  order: 1; display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 28px; height: 3px; background: var(--ink); border-radius: 3px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: clamp(46px, 7vw, 84px) 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* all section headers: size 33, golden */
.section-title {
  font-family: var(--serif);
  color: var(--gold);
  font-weight: 700;
  font-size: var(--sz-head);        /* 33 */
  margin: 0 0 10px;
  padding-bottom: 14px;
  position: relative;
}
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 3px; background: var(--gold); border-radius: 3px; }
.section-sub { color: var(--muted); font-size: 1.05rem; margin: 0 0 30px; }

/* About — first line of content, size 25, black */
.about-line {
  font-size: var(--sz-body);        /* 25 */
  color: var(--ink);
  font-weight: 500;
  max-width: 950px;
  margin: 6px 0 0;
  line-height: 1.5;
}

/* ---------- Deals (on the left side, size 25) ---------- */
.deals-left { max-width: 720px; }   /* keeps the deals on the left */
.deal-line {
  font-size: var(--sz-body);        /* 25 */
  color: var(--ink);
  margin: 0 0 18px;
  line-height: 1.5;
}
.deal-hash { color: var(--gold); font-weight: 800; margin-right: 4px; }
.deal-line strong { color: var(--ink); }
.deal-quote {
  margin: 26px 0 0; padding: 18px 26px; border-left: 4px solid var(--gold);
  background: var(--card); border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif); font-style: italic;
  font-size: 1.35rem; color: var(--ink); box-shadow: var(--shadow-sm);
}

/* ---------- Services & Partners (each on its own line, size 25) ---------- */
.services-list, .partners-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.services-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.partners-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.services-list li, .partners-list li {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 10px; padding: 14px 20px;
  font-size: var(--sz-body);        /* 25 */
  font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .2s ease;
}
.services-list li:hover, .partners-list li:hover { transform: translateX(4px); box-shadow: var(--shadow); }

/* ---------- Offerings (button + image + name; click shows info) ---------- */
.offerings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.offer-card {
  display: flex; flex-direction: column; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; padding: 0; font: inherit; color: inherit;
  box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .25s ease;
}
.offer-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.offer-card:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }
.offer-img { height: 175px; background-size: cover; background-position: center; }
.offer-name {
  padding: 18px 22px;
  font-size: var(--sz-body);        /* 25 */
  font-weight: 700;
  font-family: var(--serif);
  color: var(--gold-deep);
}

/* ---------- Directors (all in the same row) ---------- */
.directors-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.director-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; text-align: center; box-shadow: var(--shadow-sm);
}
.director-photo { width: 160px; height: 160px; margin: 0 auto 18px; border-radius: 50%; overflow: hidden; border: 4px solid var(--gold-light); box-shadow: var(--shadow-sm); }
.director-photo img { width: 100%; height: 100%; object-fit: cover; }
.director-name { font-family: var(--serif); color: var(--ink); margin: 0; font-size: 1.6rem; }
.director-role { color: var(--gold-deep); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: .9rem; margin: 4px 0 14px; }
.director-bio { color: var(--ink-soft); font-size: 1.02rem; text-align: left; line-height: 1.6; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: #14120e; color: #d9d2c2; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding: 60px 24px 40px; }
.footer-name { font-family: var(--serif); color: var(--gold-light); margin: 0; font-size: 1.9rem; }
.footer-tagline { color: #b9b1a0; margin: 6px 0 18px; }
.footer-gst { font-size: .98rem; color: #cfc7b6; }
.footer-head { color: var(--gold-light); font-size: 1.25rem; margin: 0 0 16px; font-family: var(--serif); }
.footer-line { margin: 0 0 16px; font-size: 1rem; line-height: 1.6; color: #cfc7b6; }
.footer-line strong { color: #fff; }
.site-footer a { color: #e7dfcd; }
.site-footer a:hover { color: var(--gold-light); }
.socials { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; }
.socials a { font-weight: 600; }
.quick-links { display: flex; flex-direction: column; gap: 12px; }
.quick-links a { font-weight: 600; font-size: 1.05rem; }
.footer-bottom { border-top: 1px solid #2a2620; padding: 20px 0; text-align: center; font-size: .9rem; color: #9a9382; }
.footer-bottom p { margin: 0; }

/* ============================================================
   OFFERING MODAL
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20,18,14,.6); backdrop-filter: blur(3px); }
.modal-dialog {
  position: relative; max-width: 540px; width: calc(100% - 40px);
  margin: 10vh auto 0; background: #fff; border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(0,0,0,.35); padding: 0 0 30px;
  max-height: 86vh; overflow-y: auto;   /* long details stay scrollable on small phones */
  animation: pop .22s ease;
}
@keyframes pop { from { transform: translateY(16px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-media { height: 200px; background-size: cover; background-position: center; background-color: var(--bg-alt); border-radius: var(--radius) var(--radius) 0 0; }
.modal-title { font-family: var(--serif); color: var(--gold-deep); font-size: 1.9rem; margin: 22px 30px 10px; }
.modal-detail { color: var(--ink-soft); font-size: 1.2rem; margin: 0 30px; line-height: 1.5; }
.modal-close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--ink); font-size: 1.7rem; line-height: 1;
  box-shadow: var(--shadow-sm);
}
.modal-close:hover { background: #fff; color: var(--gold-deep); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ============================================================
   RESPONSIVE  — shrink the exact sizes on smaller screens
   ============================================================ */
@media (max-width: 1024px) {
  :root { --sz-name: 40px; --sz-nav: 20px; --sz-body: 21px; --sz-head: 29px; }
  .offerings-grid { grid-template-columns: repeat(2, 1fr); }
  .partners-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  :root { --sz-name: 32px; --sz-tagline: 16px; --sz-nav: 20px; --sz-body: 19px; --sz-head: 26px; }
  html { scroll-padding-top: 96px; }

  .nav-toggle { display: flex; }
  .header-inner { flex-wrap: wrap; align-items: center; }
  .brand { order: 2; text-align: right; flex: 1; }
  .primary-nav {
    order: 4; width: 100%; flex-direction: column; gap: 0;
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .primary-nav.open { max-height: 560px; padding-top: 8px; }
  .nav-link { width: 100%; padding: 12px 6px; border-bottom: 1px solid var(--line); }
  .nav-link::after { display: none; }

  .services-list, .partners-list, .offerings-grid, .directors-row { grid-template-columns: 1fr; }
  .directors-row { max-width: 460px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }

  /* modal fills more of a phone screen and stays scrollable */
  .modal-dialog { margin: 6vh auto 0; width: calc(100% - 28px); max-height: 88vh; }
  .modal-media { height: 160px; }
  .modal-title { margin: 18px 22px 8px; }
  .modal-detail { margin: 0 22px; }
}

@media (max-width: 480px) {
  :root { --sz-name: 28px; --sz-tagline: 15px; --sz-head: 24px; --sz-body: 18px; }
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .offer-img { height: 190px; }          /* single column — a bit taller reads better */
  .deal-quote { padding: 16px 18px; font-size: 1.15rem; }
  .director-photo { width: 128px; height: 128px; }
  .footer-grid { padding: 44px 16px 32px; }
}
