/* ==========================================================================
   Ankardia — shared stylesheet
   One stylesheet for every page, so the header, nav and type never shift
   from page to page.
   ========================================================================== */

:root {
  --brand: #096170;          /* Ankardia teal */
  --brand-dark: #07505c;
  --ink: #0f172a;            /* headings */
  --body: #475569;           /* paragraph text */
  --muted: #64748b;          /* eyebrows, footer */
  --line: #e5e7eb;
  --bg: #fafafa;             /* chalk white */
  --surface: #ffffff;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text: "PT Serif", Georgia, "Times New Roman", serif;  /* body copy */

  --header-h: 76px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
}

/* ---- Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  /* Reserve the scrollbar's space on every page, so short pages and long
     pages lay out at the same width and the header never jumps sideways. */
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--body);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--brand); }
h1, h2, h3, p { margin: 0; }

.skip-link {
  position: absolute; left: 16px; top: -48px;
  background: var(--brand); color: #fff; padding: 10px 16px;
  border-radius: 4px; z-index: 100; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- Header ----------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(250, 250, 250, 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .container {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { display: block; flex: 0 0 auto; line-height: 0; }
.logo img {
  /* Fixed size on every page */
  width: 160px; height: auto; /* original logo, transparent background */
}

.nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); }
.nav a {
  position: relative;
  font-family: var(--sans);
  font-size: 15px; font-weight: 500; letter-spacing: .01em;
  color: var(--ink); text-decoration: none;
  padding: 8px 0;
  white-space: nowrap;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px;
  height: 1px; background: var(--brand);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav a:hover { color: var(--brand); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--brand); }
.nav .nav-cta {
  padding: 9px 18px; border-radius: 999px;
  background: var(--brand); color: #fff;
  transition: background .2s ease;
}
.nav .nav-cta::after { display: none; }
.nav .nav-cta:hover { background: var(--brand-dark); color: #fff; }

/* ---- Shared type ------------------------------------------------------ */
.eyebrow {
  font-family: var(--sans);
  font-size: clamp(11px, 1.1vw, 13px); font-weight: 600;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--muted);
}
.display {
  font-family: var(--serif); font-weight: 400;
  color: var(--ink);
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.1; letter-spacing: -0.02em;
}
.display em { font-style: italic; color: var(--brand); }
.prose p + p { margin-top: 1.4em; }
.prose strong { font-weight: 700; font-style: italic; color: var(--ink); }
.rule { width: 64px; height: 1px; background: rgba(9, 97, 112, .4); border: 0; margin: 0; }

main { flex: 1 0 auto; }

/* ---- Home ------------------------------------------------------------- */
.hero { text-align: center; padding-top: clamp(48px, 9vw, 104px); padding-bottom: clamp(40px, 6vw, 64px); }
.hero .eyebrow { margin-bottom: clamp(20px, 3vw, 32px); }

.hero-image {
  position: relative;
  height: clamp(300px, 55vw, 650px);
  border-radius: 2px; overflow: hidden;
  background: var(--line);
}
.hero-image img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.25) brightness(.9);
  transition: transform 1.2s cubic-bezier(.16, 1, .3, 1);
}
.hero-image::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(15, 23, 42, .1); mix-blend-mode: multiply;
  transition: opacity .7s ease;
}
.hero-image:hover img { transform: scale(1.04); }
.hero-image:hover::after { opacity: 0; }

.intro {
  max-width: 900px; margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(64px, 10vw, 128px);
}
.intro .prose {
  font-size: clamp(17px, 1.9vw, 23px); font-weight: 400; line-height: 1.7;
}
.intro .rule { margin-top: clamp(40px, 6vw, 64px); }

/* ---- About ------------------------------------------------------------ */
/* Intro: same treatment as the home page headline */
.about-intro {
  text-align: center;
  padding-top: clamp(48px, 9vw, 104px);
  padding-bottom: clamp(40px, 6vw, 72px);
}
.about-intro .eyebrow { margin-bottom: clamp(20px, 3vw, 32px); }
.about-intro-text {
  max-width: 720px; margin: clamp(24px, 3.5vw, 40px) auto 0;
  font-size: clamp(17px, 1.7vw, 21px); line-height: 1.7; color: var(--body);
}
.about-intro-text em { font-style: italic; color: var(--brand); }
.about { padding-bottom: clamp(64px, 10vw, 128px); }
.about .about-grid { border-top: 1px solid var(--line); padding-top: clamp(40px, 6vw, 72px); }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
  max-width: 1040px; margin: 0 auto;
}
.about-head { margin-bottom: clamp(28px, 4vw, 40px); }
.about-head .eyebrow { margin-bottom: 16px; }
.about-head .display { font-size: clamp(36px, 5vw, 56px); }
.about .prose { font-size: clamp(16px, 1.4vw, 18px); line-height: 1.75; }
.about .rule { margin-top: 48px; }

.portrait {
  margin: 0;
}
.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 12px 32px -12px rgba(15, 23, 42, .25);
}
.portrait figcaption {
  font-family: var(--sans);
  margin-top: 16px; font-size: 14px; color: var(--muted); line-height: 1.5;
}
.portrait figcaption strong { display: block; color: var(--ink); font-weight: 600; font-size: 15px; }

/* ---- Services --------------------------------------------------------- */
/* Centered intro, matching the Home and About headlines */
.page-intro {
  text-align: center;
  padding-top: clamp(48px, 9vw, 104px);
  padding-bottom: clamp(40px, 6vw, 72px);
  max-width: 1040px;
}
.page-intro .eyebrow { margin-bottom: clamp(20px, 3vw, 32px); }
.lede {
  margin: clamp(24px, 3.5vw, 40px) auto 0;
  max-width: 720px;
  font-size: clamp(17px, 1.6vw, 20px); line-height: 1.7;
}

.offers {
  max-width: 1040px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(4, auto);
  margin-bottom: clamp(64px, 9vw, 112px);
}
.offer {
  /* Subgrid lines up number, title, text and Details across all three cells,
     so opening one card never shifts the buttons in the others. */
  display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0;
  align-content: start;
  padding: clamp(28px, 3vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
}
.offer + .offer { border-left: 0; }
.offer-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.offer-num {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 30px; line-height: 1; color: var(--brand);
}
.offer-format {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  text-align: right;
}
.offer h2 {
  margin-top: clamp(32px, 4vw, 48px);
  font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: clamp(24px, 2.3vw, 28px); line-height: 1.2;
}
.offer-line { margin-top: 14px; font-size: 17px; line-height: 1.6; }

.offer-details { padding-top: 28px; }
.offer-details summary {
  display: inline-flex; align-items: center; gap: 7px;
  cursor: pointer; list-style: none; user-select: none;
  font-family: var(--sans); font-size: 12px; font-weight: 400;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  padding: 4px 0;
}
.offer-details summary::-webkit-details-marker { display: none; }
/* Teal plus that turns into a minus when open */
.offer-details .plus { position: relative; width: 11px; height: 11px; flex: 0 0 11px; }
.offer-details .plus::before, .offer-details .plus::after {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 11px; height: 1.5px; background: var(--brand);
  transform: translateY(-50%);
  transition: transform .25s ease;
}
.offer-details .plus::after { transform: translateY(-50%) rotate(90deg); }
.offer-details[open] .plus::after { transform: translateY(-50%) rotate(0deg); }
.offer-details summary:hover { color: var(--brand); }
.offer-details p:first-of-type {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 15px; line-height: 1.65;
}
.offer-details .offer-label {
  margin-top: 22px;
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
/* Matches the deliverables style in the advisory overview PDF:
   small triangle bullets and italic serif text */
.offer-outcomes { list-style: none; margin: 8px 0 0; padding: 0; }
.offer-outcomes li {
  position: relative; padding: 3px 0 3px 16px;
  font-size: 15px; line-height: 1.6; font-style: italic; color: var(--ink);
}
.offer-outcomes li::before {
  content: "‣"; position: absolute; left: 0; top: 3px;
  font-style: normal; color: var(--ink);
}
.offer-details[open] > :not(summary) { animation: fadeInUp .4s cubic-bezier(.16, 1, .3, 1) both; }

/* ---- Contact band ----------------------------------------------------- */
.contact {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: clamp(48px, 7vw, 80px) 0;
}
.contact .container {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.contact h2 {
  font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: clamp(26px, 3.2vw, 36px); line-height: 1.2;
}
.contact h2 em { color: var(--brand); }
.button {
  font-family: var(--sans);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  background: var(--brand); color: #fff; text-decoration: none;
  font-weight: 500; font-size: 15px;
  transition: background .2s ease, transform .2s ease;
}
.button:hover { background: var(--brand-dark); transform: translateY(-1px); }
.button svg { width: 16px; height: 16px; }

/* ---- Footer ----------------------------------------------------------- */
.site-footer {
  font-family: var(--sans);
  border-top: 1px solid var(--line);
  padding: 28px 0;
  font-size: 14px; color: var(--muted);
}
.site-footer .container {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.site-footer a { color: var(--brand); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---- Entrance animation ---------------------------------------------- */
.fade-in { animation: fadeInUp 1s cubic-bezier(.16, 1, .3, 1) both; }
.d1 { animation-delay: .1s; } .d2 { animation-delay: .2s; }
.d3 { animation-delay: .3s; } .d4 { animation-delay: .4s; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { animation: none; }
  .hero-image img, .hero-image::after, .button { transition: none; }
}

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 900px) {
  .offers { grid-template-columns: 1fr; }
  .offer + .offer { border-left: 1px solid var(--line); border-top: 0; }
  .offer h2 { margin-top: 24px; }
}
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
  .portrait { position: static; order: -1; display: flex; align-items: center; gap: 20px; }
  .portrait img { width: 120px; flex: 0 0 120px; border-radius: 50%; aspect-ratio: 1; object-position: 50% 20%; }
  .portrait figcaption { margin-top: 0; }
}
@media (max-width: 560px) {
  :root { --header-h: 64px; }
  .logo img { width: 124px; }
  .nav { gap: 16px; }
  .nav a { font-size: 14px; }
  .nav .nav-cta { padding: 8px 14px; }
}
@media (max-width: 480px) {
  /* Phones: Contact becomes a plain link so all four fit */
  .logo img { width: 108px; }
  .nav { gap: 13px; }
  .nav a { font-size: 13.5px; }
  .nav .nav-cta, .nav .nav-cta:hover { padding: 8px 0; background: none; color: var(--ink); border-radius: 0; }
  .nav .nav-cta::after { display: block; }
  .nav .nav-cta[aria-current="page"] { color: var(--brand); background: none; }
}

/* ---- Contact page ----------------------------------------------------- */
.contact-grid {
  max-width: 1040px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  margin-bottom: clamp(64px, 9vw, 112px);
}
.schedule, .form-wrap {
  padding: clamp(28px, 3vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
}
.form-wrap { border-left: 0; }
.schedule h2, .form-wrap h2 {
  margin-top: 0;
  font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: clamp(24px, 2.3vw, 28px); line-height: 1.2;
}
.schedule > p:not(.offer-num):not(.schedule-note) { margin-top: 12px; font-size: 16px; line-height: 1.6; }
.schedule .button { margin-top: 24px; }
.schedule-note { margin-top: 10px; font-family: var(--sans); font-size: 13px; color: var(--muted); }
.schedule-direct { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.schedule-direct .offer-label {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.schedule-direct a { display: inline-block; margin-top: 6px; font-size: 16px; color: var(--brand); text-decoration: none; }
.schedule-direct a:hover { text-decoration: underline; text-underline-offset: 4px; }

.contact-form { margin-top: 24px; display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label {
  font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink);
}
.field label span { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; font-size: 16px; color: var(--ink);
  padding: 11px 12px;
  background: var(--bg);
  border: 1px solid var(--line); border-radius: 4px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23096170' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 36px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background-color: #fff;
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(9, 97, 112, .12);
}
.field .is-invalid, .field input.is-invalid, .field textarea.is-invalid { border-color: #b4533c; }
.contact-form .button { justify-self: start; border: 0; cursor: pointer; }
.contact-form .button:disabled { opacity: .6; cursor: default; transform: none; }
.form-status { font-family: var(--sans); font-size: 14px; min-height: 1.4em; }
.form-status.is-success { color: var(--brand); }
.form-status.is-error { color: #b4533c; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-wrap { border-left: 1px solid var(--line); border-top: 0; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}
.nav .nav-cta[aria-current="page"] { color: #fff; background: var(--brand-dark); }
@media (max-width: 400px) {
  /* Smallest phones: the logo already links home, so drop the Home link */
  .nav a[href="/"] { display: none; }
}
@media (max-width: 480px) {
  .nav .nav-cta[aria-current="page"] { background: none; color: var(--brand); }
}
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--brand); }

/* About: bio on the left, photo + highlights stacked on the right.
   On phones: photo, then bio, then highlights. */
.about-grid {
  grid-template-areas: "bio photo" "bio highlights";
  grid-template-rows: auto 1fr;
  row-gap: 32px;
}
.about-bio { grid-area: bio; }
.portrait { grid-area: photo; }
.highlights { grid-area: highlights; }
.highlights .offer-label {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.highlights ul { list-style: none; margin: 10px 0 0; padding: 0; }
.highlights li {
  padding: 9px 0; border-top: 1px solid var(--line);
  font-size: 14.5px; line-height: 1.5; color: var(--ink);
}
.highlights li:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 820px) {
  .about-grid { grid-template-areas: "photo" "bio" "highlights"; grid-template-rows: auto; }
}
