/* ==========================================================================
   Griffin Markets - main stylesheet
   --------------------------------------------------------------------------
   1. Settings (colours, sizes)      6. Page sections
   2. Base                           7. Components
   3. Layout helpers                 8. News
   4. Header & navigation            9. Utilities
   5. Footer                        10. Responsive
   ========================================================================== */


/* 1. Settings ------------------------------------------------------------ */
:root {
  --navy: #171d38;
  --cyan: #00daff;
  --grey: #e8e8e8;
  --text: #000;
  --text-muted: #666;
  --border: #ddd;
  --white: #fff;

  --font: 'Open Sans', Helvetica, Arial, sans-serif;
  --container: 89%;
  --container-max: 1400px;
  --section-space: 60px;
  --header-height: 66px;
  --small: 14px;
}


/* 2. Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 20px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .6em; font-weight: 500; line-height: 1.2; }
h1, h2 { font-size: 34px; }
h3 { font-size: 24px; }

p, ul, ol, table { margin: 0 0 1.1em; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.4em; }

strong { font-weight: 600; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; vertical-align: middle; }

table { border-collapse: collapse; }
td, th { padding: 4px 16px 4px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }


/* 3. Layout helpers ------------------------------------------------------ */
.container {
  width: var(--container);
  max-width: var(--container-max);
  margin: 0 auto;
}

/* Columns: <div class="grid grid--2"> ... </div> (also grid--3, grid--4) */
.grid { display: grid; gap: 30px 5.5%; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 3%; }


/* 4. Header & navigation ------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: auto;
  max-width: none;
  min-height: var(--header-height);
  padding: 0 32px 0 30px;
}
.site-header__logo img { display: block; height: 37px; width: auto; }

.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: block;
  padding: 8px 0;
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .3s;
}
.site-nav a:hover { opacity: .7; }
.site-nav a[aria-current="page"] { color: var(--cyan); }

/* burger button (only visible on small screens) */
.site-header__toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.burger, .burger::before, .burger::after {
  display: block; width: 24px; height: 2px; background: var(--cyan); position: relative; transition: transform .2s;
}
.burger::before, .burger::after { content: ''; position: absolute; left: 0; }
.burger::before { top: -7px; }
.burger::after { top: 7px; }


/* 5. Footer -------------------------------------------------------------- */
.site-footer { background: var(--navy); color: #d3d3d3; padding: 40px 0 30px; font-size: 12px; font-weight: 500; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 30px; }
.site-footer__copy { margin: 0; }
.site-footer__links { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.site-footer__links li + li::before { content: '|'; margin: 0 6px; }
.site-footer__links li.site-footer__social::before { content: none; }
.site-footer__social { margin-left: 16px; }
.site-footer a { color: #d8d8d8; text-transform: uppercase; }


/* 6. Page sections ------------------------------------------------------- */
/* <section class="section">          white
   <section class="section section--grey">   light grey
   <section class="section section--dark">   navy, white text
   <section class="hero" style="background-image:url(/assets/img/bg1.jpg)">  page header */
.section { padding: var(--section-space) 0; }
.section--grey { background: var(--grey); }
.section--dark { background-color: var(--navy); color: var(--white); }

.hero {
  padding: var(--section-space) 0;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  color: var(--white);
}
.hero h1 { max-width: 47%; }
.hero--home h1 { line-height: 1.5; }
.hero--home h1 { max-width: none; }

/* Small cyan label above a title: <p class="eyebrow">Our mission</p> */
.eyebrow {
  margin: 0 0 .5em;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.4;
}

/* Title followed by a short rule: <h1 class="rule">...</h1> */
.rule::after {
  content: '';
  display: block;
  width: 100px;
  margin: 30px 0 25px;
  border-top: 1px solid currentColor;
}
.section--dark .rule::after, .hero .rule::after { border-top-color: var(--white); }


/* 7. Components ---------------------------------------------------------- */

/* "Read More +" style link */
.more { display: inline-block; margin-top: 4px; color: var(--cyan); font-size: var(--small); font-weight: 400; }

/* Button */
.button {
  display: inline-block;
  padding: 6px 18px;
  border: 0;
  background: var(--cyan);
  color: var(--white);
  font: 600 14px/1.7 var(--font);
  cursor: pointer;
}
.button:hover { background: #00b8d8; text-decoration: none; }

/* Text + illustration, two columns: <div class="feature"> ... </div>
   add "feature--reverse" to put the illustration on the left */
.feature { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 5.5%; align-items: start; }
.feature__media { padding-top: 20px; text-align: center; }
.feature__media img { width: 100%; max-width: 200px; }
.feature--reverse .feature__media { order: -1; }

/* Strategy cards on the home page */
.cards h2 { font-size: 26px; }

/* Questions & answers (no JavaScript needed): <details class="faq"> */
.faq { border-bottom: 1px solid #d9d9d9; }
.faq summary {
  position: relative;
  padding: 20px 50px 20px 20px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute; right: 10px; top: 50%;
  width: 18px; height: 18px; margin-top: -9px;
  border-radius: 50%;
  background: #999; color: var(--white);
  font: 600 14px/18px var(--font); text-align: center;
}
.faq[open] summary::after { content: '–'; }
.faq__answer { width: 50%; padding: 0 20px 20px; font-size: 16px; }

/* Awards logos */
.awards { align-items: start; }
.awards__item { font-size: 12px; line-height: 1.4; text-align: center; }
.awards__item a { color: var(--text); }
.awards__logo { display: flex; align-items: center; justify-content: center; height: 130px; margin-bottom: 10px; }
.awards__logo img { max-height: 130px; width: auto; }

/* Side list of documents (Regulation page) */
.doc-list h3 { margin: 1.4em 0 .4em; font-size: 20px; font-weight: 600; }
.doc-list h3:first-child { margin-top: 0; }
.doc-list ul { list-style: none; padding: 0; }
.doc-list li { margin-bottom: .8em; font-weight: 600; }

/* Office address + map */
.office { margin: 40px 0; }
.office__map { display: block; width: 100%; height: 350px; margin-top: 20px; border: 1px solid #000; }

/* Contact form (or e-mail box when no form service is configured) */
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form label { display: block; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 20px;
  background: #eee;
  font: 300 14px var(--font);
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form .button { justify-self: end; grid-column: 2; }
.contact-box { padding: 24px; background: #f4f4f4; }

/* Market data charts */
.chart { height: 250px; min-width: 250px; margin-top: 20px; background: var(--white); }
.chart__notice { display: flex; align-items: center; justify-content: center; height: 100%; padding: 20px;
  color: var(--text-muted); font-size: 13px; text-align: center; border: 1px dashed #ccc; }

/* Text pages (legal pages, policies) */
.prose { max-width: 1000px; }
.prose h2 { margin: 1.4em 0 .4em; font-size: 20px; font-weight: 600; }


/* 8. News ---------------------------------------------------------------- */

/* Latest news slider (home page) */
.slider { max-width: 50%; }
.slider__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__slide { flex: 0 0 100%; padding: 10px 60px 0; scroll-snap-align: start; }
.slider__slide h3 { font-size: 20px; font-weight: 600; line-height: 1; }
.slider__slide h3 a { color: var(--text); }
.slider__slide p { font-size: 18px; font-weight: 400; color: #333; line-height: 34px; }
.slider__dots { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.slider__dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #ccc; cursor: pointer; }
.slider__dots button[aria-current="true"] { background: #333; }

/* News page: cards in columns */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 5.5%; align-items: start; }
.news-card {
  padding: 19px;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
}
.news-card h2 { margin-bottom: .5em; font-size: 20px; font-weight: 500; line-height: 1.4; }
.news-card time { display: block; margin-bottom: .3em; }
.news-card .read-more { display: inline-block; margin-top: .6em; color: var(--text); font-weight: 700; }

/* News article */
.article__nav { max-width: 66%; margin-bottom: 30px; font-size: 16px; font-weight: 500; }
.article__pager { display: flex; justify-content: space-between; gap: 20px; margin-top: 15px; font-size: var(--small); font-weight: 400; }
.article__pager .next { margin-left: auto; text-align: right; }
.article__layout { display: grid; grid-template-columns: 2fr 1fr; gap: 30px 5.5%; }
.article__body { font-size: 16px; font-weight: 500; text-align: justify; }
.article__body h1 { font-size: 26px; text-align: left; }
.article__aside { font-size: 16px; font-weight: 500; }
.article__aside a { font-weight: 600; }


/* 9. Utilities ----------------------------------------------------------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.text-muted { color: var(--text-muted); }
.mt-20 { margin-top: 20px; }


/* 10. Responsive --------------------------------------------------------- */
@media (max-width: 1100px) {
  .site-nav ul { gap: 0 14px; }
  .site-nav a { font-size: 13px; }
}

@media (max-width: 980px) {
  :root { --section-space: 50px; }
  .site-header__inner { padding: 0 20px; }
  .site-header__toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy);
    border-top: 3px solid var(--cyan);
    box-shadow: 0 2px 5px rgba(0,0,0,.2);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { display: block; padding: 10px 5%; }
  .site-nav a { padding: 10px 5%; font-size: 14px; }
  .site-header__toggle[aria-expanded="true"] .burger { background: transparent; }
  .site-header__toggle[aria-expanded="true"] .burger::before { transform: translateY(7px) rotate(45deg); }
  .site-header__toggle[aria-expanded="true"] .burger::after { transform: translateY(-7px) rotate(-45deg); }

  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1, .slider, .article__nav { max-width: none; }
}

@media (max-width: 767px) {
  body { font-size: 17px; }
  h1, h2 { font-size: 26px; }
  .grid--2, .grid--3, .grid--4,
  .feature, .article__layout { grid-template-columns: minmax(0, 1fr); }
  .feature--reverse .feature__media { order: 0; }
  .news-grid { grid-template-columns: minmax(0, 1fr); }
  .faq__answer { width: auto; }
  .slider__slide { padding: 10px 0 0; }
  .contact-form { grid-template-columns: 1fr; }
  .contact-form .button { grid-column: 1; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
}
