/*
Theme Name: ACME Resources
Description: Generic ASX explorer theme built around the Investi v2 widgets.
Version: 0.1.0
Requires PHP: 8.0
Text Domain: acme
*/

:root {
  --ink: #0f1b2d;
  --ink-2: #33415a;
  --muted: #6b7486;
  --line: #e3e0d8;
  --paper: #f6f4ef;
  --white: #ffffff;
  --accent: #c8692c;
  --accent-dark: #a5541f;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 8px 24px rgba(15, 27, 45, .06);
  --wrap: 1200px;
  --font-head: "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 16px/1.6 var(--font-body);
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-dark); }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .75em 1.3em; border-radius: 999px;
  font: 600 .95rem/1 var(--font-body); text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-dark); color: var(--white); }
.btn--light { border-color: rgba(255,255,255,.6); color: var(--white); }
.btn--light:hover { background: var(--white); color: var(--ink); }

/* ---------- header share quote ---------- */
.quote { display: flex; align-items: center; gap: 8px; white-space: nowrap; flex-shrink: 0; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: .85rem; color: var(--ink); text-decoration: none; }
.quote:hover { border-color: var(--accent); color: var(--ink); }
.quote div { display: inline; }
.quote__code { font-weight: 700; letter-spacing: .03em; }
.quote__last { font-weight: 600; }
.quote__move { font-weight: 600; }

/* ---------- header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { max-width: 1400px; display: flex; align-items: center; gap: 20px; min-height: 72px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand svg { width: 34px; height: 34px; }
.brand__name { font: 800 1.25rem/1 var(--font-head); letter-spacing: .02em; }
.brand__name small { display: block; font: 600 .62rem/1.4 var(--font-body); letter-spacing: .22em; color: var(--muted); text-transform: uppercase; }

.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; gap: 4px; }
.nav li { position: relative; }
.nav a { display: block; white-space: nowrap; padding: 10px 11px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; border-radius: 6px; }
.nav a:hover, .nav .current-menu-item > a, .nav .current-menu-ancestor > a, .nav .current-page-ancestor > a { color: var(--accent-dark); }
.nav .menu-item-has-children > a::after { content: ""; display: inline-block; margin-left: 6px; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 230px; padding: 8px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s;
}
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav .sub-menu a { font-weight: 500; padding: 8px 12px; }
.nav .sub-menu a:hover { background: var(--paper); }

.header-account { flex-shrink: 0; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 26px; height: 26px; display: block; }

@media (max-width: 1320px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; max-height: calc(100vh - 110px); overflow-y: auto; box-shadow: var(--shadow); }
  .nav.is-open { display: block; }
  .nav > ul { flex-direction: column; }
  .nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 12px; min-width: 0; }
  .nav .menu-item-has-children > a::after { display: none; }
  .header-account { margin-left: auto; }
  .nav-toggle { order: 3; margin-left: 0; }
}
@media (max-width: 600px) {
  .site-header .wrap { gap: 10px; min-height: 64px; }
  .brand svg { width: 28px; height: 28px; }
  .brand__name { font-size: 1.1rem; }
  .stat__value { font-size: 1.05rem; }
  .quote { display: none; }
  body .investi-nav-account .investi-nav-account__register-login { padding: 7px 12px; font-size: .82rem; white-space: nowrap; }
}

/* ---------- page header (slim, no banner) ---------- */
.page-head { background: var(--paper); border-bottom: 1px solid var(--line); padding: 28px 0 24px; }
.page-head h1 { margin: 0; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-dark); }
.crumbs span { margin: 0 6px; }

/* ---------- sections ---------- */
.section { padding: 56px 0; }
.section--tight { padding: 28px 0; }
.section--tight + .section--tight { padding-top: 0; }
.section--paper { background: var(--paper); }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section__head h2 { margin: 0; }
.eyebrow { font: 700 .75rem/1 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: 10px; }
.link-arrow { font-weight: 600; text-decoration: none; white-space: nowrap; font-size: .92rem; }
.link-arrow::after { content: " \2192"; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { margin-bottom: 14px; }
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.card__head h3 { margin: 0; }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--main-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 900px) { .grid--main-side { grid-template-columns: minmax(0, 1fr); } }

/* ---------- hero (home only, compact) ---------- */
.hero { position: relative; background: var(--ink); color: var(--white); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: url("assets/contours.svg") center/cover no-repeat; opacity: .5; pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-top: 40px; padding-bottom: 40px; } }
.hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
.hero p { color: #c9d1de; font-size: 1.1rem; max-width: 36em; }
.hero .eyebrow { color: #f0a46e; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero__panel { background: var(--white); color: var(--ink); border-radius: 14px; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.3); min-width: 0; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.stat { background: var(--white); padding: 16px 18px; min-width: 0; }
.stat__label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.stat__value { font: 800 1.3rem/1.2 var(--font-head); overflow-wrap: anywhere; }
.stat__value div { display: inline; }

/* ---------- projects ---------- */
.project { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--white); transition: transform .15s, box-shadow .15s; }
.project:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.project__img { aspect-ratio: 16 / 9; background: var(--ink) url("assets/contours.svg") center/cover; position: relative; }
.project__img span { position: absolute; left: 16px; bottom: 14px; color: var(--white); font: 700 .72rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; background: var(--accent); padding: 6px 10px; border-radius: 999px; }
.project__body { padding: 20px; }
.project__body p { color: var(--ink-2); margin: 0; }

/* ---------- prose ---------- */
.prose { max-width: 760px; }
.prose ul { padding-left: 1.2em; }
.prose + .grid { margin-top: 32px; }
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 28px; margin: 8px 0 24px; }
.person { border-top: 3px solid var(--accent); padding-top: 14px; }
.person h3 { margin-bottom: 2px; }
.person__role { color: var(--muted); font-size: .9rem; margin-bottom: 8px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0 0 24px; }
.facts dt { font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; }

/* ---------- news ---------- */
.news-item { padding: 16px 0; border-top: 1px solid var(--line); }
.news-item__date { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.news-item h4 { font-size: 1.05rem; margin-bottom: 6px; }
.news-item h4 a { color: var(--ink); text-decoration: none; }
.news-item h4 a:hover { color: var(--accent-dark); }
.news-item p { margin: 0; color: var(--ink-2); }

/* ---------- subscribe band ---------- */
.band { background: var(--ink); color: var(--white); }
.band .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; align-items: center; }
@media (max-width: 900px) { .band .wrap { grid-template-columns: minmax(0, 1fr); } }
.band p { color: #c9d1de; }
.band .card { color: var(--ink); }

/* ---------- login page ---------- */
.login-shell { max-width: 480px; margin: 0 auto; }

/* ---------- footer ---------- */
.site-footer { background: #0a1322; color: #9aa6b8; font-size: .9rem; padding: 48px 0 24px; }
.site-footer a { color: #c9d1de; text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--white); font: 700 .8rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer .brand { color: var(--white); margin-bottom: 14px; }
.site-footer .brand svg path:first-child { fill: #ffffff; }
.site-footer .brand__name small { color: #9aa6b8; }
.footer-base { border-top: 1px solid #1d2a40; margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- investi widget tuning ---------- */
.hero__panel .investi-share-price-chart { min-height: 260px; }
.card .investi-share-price-chart { min-height: 300px; }
/* theme supplies its own card headings */
.investi-announcements-header { display: none; }

body .investi-add-subscriber input:not([type=checkbox]):not([type=radio]) { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font: inherit; }
body .investi-add-subscriber input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
body .investi-add-subscriber__submit { background: var(--accent); color: var(--white); border: 0; border-radius: 999px; padding: 10px 22px; font: 600 .95rem/1 var(--font-body); cursor: pointer; }
body .investi-add-subscriber__submit:hover { background: var(--accent-dark); }
body .investi-comments-add-comment-button { background: var(--accent); color: var(--white); border: 0; border-radius: 999px; padding: 12px 24px; font: 600 .95rem/1 var(--font-body); text-transform: none; cursor: pointer; }
body .investi-comments-add-comment-button:hover { background: var(--accent-dark); }

body .investi-add-subscriber__social { flex-wrap: wrap; gap: 8px; }

.card .investi-announcements-thumbnail__anchor { display: flex; gap: 16px; align-items: flex-start; text-decoration: none; }
.card .investi-announcements-thumbnail__anchor img { width: 140px; flex-shrink: 0; border-radius: 6px; box-shadow: var(--shadow); }
.card .investi-announcements-thumbnail__headline { font-weight: 600; color: var(--ink); }
.card .investi-announcements-thumbnail__anchor:hover .investi-announcements-thumbnail__headline { color: var(--accent-dark); }

body .investi-nav-account .investi-nav-account__register-login { background: var(--ink); color: var(--white); border-radius: 999px; padding: 9px 18px; font-weight: 600; text-decoration: none; }
body .investi-nav-account .investi-nav-account__register-login:hover { background: var(--accent); color: var(--white); }
