/*
Theme Name: Andrei Tone
Theme URI: https://andreitone.com
Author: Built for Andrei Tone
Description: An executive identity for Andrei Tone — founder of Tone Films, Tone Talent Agency and Atomic Accounting, director, speaker and doctoral candidate in leadership. Editorial serif typography on a deep navy ground, with everything editable from Appearance > Customize.
Version: 2.2.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: andrei-tone
*/

/* ============================================================
   Tokens — INK
   Deep navy ground, warm ivory type, antique brass accent.
   ============================================================ */
:root {
  --bg:       #0D131E;
  --bg-2:     #121A27;
  --surface:  #16202F;
  --line:     #23304A;
  --line-2:   #33405C;
  --text:     #EEEAE1;
  --muted:    #A2ACBD;
  --dim:      #6E7A8E;
  --accent:   #BE9A57;
  --accent-2: #D9BC84;

  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --max: 1240px;
  --pad: 48px;
  --rule: 1px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 400; text-wrap: balance; }
p, figure, blockquote { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; }

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

::selection { background: var(--accent); color: var(--bg); }

.at-skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--accent); color: var(--bg); padding: 12px 18px;
}
.at-skip:focus { left: 0; }

.at-wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* ============================================================
   Shared type roles
   ============================================================ */
.at-eyebrow {
  font-family: var(--sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: .17em; text-transform: uppercase;
  color: var(--dim);
}
.at-eyebrow--accent { color: var(--accent); }

.at-lede {
  font-family: var(--serif);
  font-size: clamp(19px, 1.5vw, 22px);
  line-height: 1.55; font-weight: 300;
  color: var(--muted);
}

.at-ph { color: var(--dim); font-style: italic; }

.at-slot {
  display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(135deg, rgba(190,154,87,.05) 0 14px, transparent 14px 28px),
    var(--bg-2);
}
.at-slot__tag {
  font-family: var(--sans);
  font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--dim);
}

/* ---- buttons and links ---- */
.at-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans);
  font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 15px 26px;
  background: var(--accent); color: var(--bg);
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.at-btn:hover, .at-btn:focus { background: transparent; color: var(--accent); }

.at-btn--quiet { background: transparent; color: var(--text); border-color: var(--line-2); }
.at-btn--quiet:hover, .at-btn--quiet:focus { border-color: var(--accent); color: var(--accent); background: transparent; }

.at-textlink {
  display: inline-block;
  font-size: 13px; font-weight: 500; letter-spacing: .04em;
  color: var(--muted);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 3px;
  transition: color .2s ease, border-color .2s ease;
}
.at-textlink:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   Masthead
   ============================================================ */
.at-masthead {
  position: sticky; top: 0; z-index: 60;
  background: var(--bg);
  border-bottom: var(--rule) solid var(--line);
}
.admin-bar .at-masthead { top: 32px; }
@media (max-width: 782px) { .admin-bar .at-masthead { top: 46px; } }

.at-masthead__in {
  max-width: var(--max); margin: 0 auto;
  padding: 0 var(--pad);
  min-height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.at-wordmark {
  font-family: var(--serif);
  font-size: 19px; letter-spacing: .13em; text-transform: uppercase;
  white-space: nowrap;
}
.at-wordmark span { color: var(--accent); }

.at-nav ul { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.at-nav a {
  display: inline-block;
  font-size: 12.5px; font-weight: 500;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.at-nav a:hover, .at-nav a:focus { color: var(--text); border-color: var(--accent); }

.at-burger {
  display: none; background: none; border: 0; padding: 10px 0; cursor: pointer;
}
.at-burger span { display: block; width: 22px; height: 1px; background: var(--text); margin: 5px 0; }

/* ============================================================
   Hero
   ============================================================ */
.at-hero { padding: clamp(56px, 8vw, 104px) 0 0; }
.at-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: end;
}
.at-hero__title {
  font-family: var(--serif);
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.02; letter-spacing: -.024em; font-weight: 400;
  margin: 20px 0 26px;
}
.at-hero__title em { font-style: italic; color: var(--accent); }
.at-hero__deck { max-width: 46ch; }
.at-hero__actions { display: flex; align-items: center; gap: 26px; margin-top: 34px; flex-wrap: wrap; }

.at-portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border: var(--rule) solid var(--line);
  overflow: hidden;
}
.at-portrait img { width: 100%; height: 100%; object-fit: cover; }
.at-portrait .at-slot { position: absolute; inset: 0; }

/* credential rail */
.at-rail {
  margin-top: clamp(48px, 6vw, 76px);
  border-top: var(--rule) solid var(--line);
  border-bottom: var(--rule) solid var(--line);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.at-rail__item { padding: 22px 26px 22px 0; border-right: var(--rule) solid var(--line); }
.at-rail__item:last-child { border-right: 0; }
.at-rail__item:not(:first-child) { padding-left: 26px; }
.at-rail__role { display: block; margin-bottom: 5px; }
.at-rail__org { font-family: var(--serif); font-size: 18px; line-height: 1.3; }

/* ============================================================
   Sections
   ============================================================ */
.at-section { padding: clamp(64px, 8vw, 108px) 0; }
.at-section--tint { background: var(--bg-2); }
.at-section__head { margin-bottom: 44px; }
.at-section__title {
  font-family: var(--serif);
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -.018em; line-height: 1.1;
  margin-top: 12px;
}

/* ---- the record ---- */
.at-record { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: var(--rule) solid var(--line); }
.at-record__cell {
  padding: 26px 20px 26px 0;
  border-bottom: var(--rule) solid var(--line);
  border-right: var(--rule) solid var(--line);
}
.at-record__cell:last-child { border-right: 0; }
.at-record__cell:not(:first-child) { padding-left: 20px; }
.at-record__num {
  font-family: var(--serif);
  font-size: clamp(26px, 2.9vw, 40px);
  line-height: 1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}
.at-record__lbl { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* ---- companies ledger ---- */
.at-ledger { border-top: var(--rule) solid var(--line); }
.at-entry {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) minmax(0, 2.6fr);
  gap: 32px; align-items: baseline;
  padding: 34px 0;
  border-bottom: var(--rule) solid var(--line);
  transition: background .25s ease;
}
.at-entry:hover { background: var(--surface); }
.at-entry__name { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 31px); letter-spacing: -.015em; line-height: 1.15; }
.at-entry__role { display: block; margin-top: 9px; }
.at-entry__text { color: var(--muted); font-size: 16px; line-height: 1.62; }
.at-entry__link {
  font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); justify-self: end; text-align: right; white-space: nowrap;
  padding-right: 18px;
}
.at-entry:hover .at-entry__link { color: var(--accent-2); }

/* ---- profile ---- */
.at-profile { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(36px, 5vw, 72px); align-items: start; }
.at-pull {
  font-family: var(--serif);
  font-size: clamp(25px, 2.7vw, 34px);
  line-height: 1.26; letter-spacing: -.015em; font-weight: 300;
  margin-bottom: 30px; max-width: 24ch;
}
.at-pull em { font-style: italic; color: var(--accent); }
.at-profile__body { max-width: 64ch; }
.at-profile__body p {
  font-family: var(--serif);
  font-size: 18.5px; line-height: 1.72; font-weight: 300;
  color: var(--muted); margin-bottom: 22px;
}
.at-profile__body p:last-child { margin-bottom: 0; }

/* ---- clients ---- */
.at-clients-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.at-clients {
  font-family: var(--serif);
  font-size: clamp(20px, 2.1vw, 27px);
  line-height: 1.62; font-weight: 300;
  color: var(--muted);
}
.at-clients b { color: var(--text); font-weight: 400; }

/* ---- direction (films) ---- */
.at-films { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.at-film__frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border: var(--rule) solid var(--line);
  overflow: hidden; margin-bottom: 16px;
  transition: border-color .25s ease;
}
.at-film__frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.3,1); }
.at-film:hover .at-film__frame { border-color: var(--accent); }
.at-film:hover .at-film__frame img { transform: scale(1.04); }
.at-film__frame .at-slot { position: absolute; inset: 0; }
.at-film__title { font-family: var(--serif); font-size: 20px; line-height: 1.3; margin-top: 7px; }

/* ---- notes ---- */
.at-notes { border-top: var(--rule) solid var(--line); }
.at-note-row {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 30px; align-items: baseline;
  padding: 28px 0;
  border-bottom: var(--rule) solid var(--line);
  transition: background .25s ease;
}
.at-note-row:hover { background: var(--surface); }
.at-note-row__title { display: block; font-family: var(--serif); font-size: clamp(20px, 2vw, 26px); line-height: 1.25; letter-spacing: -.012em; }
.at-note-row__ex { display: block; color: var(--muted); font-size: 15.5px; margin-top: 8px; max-width: 62ch; }
.at-note-row__read { font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--dim); white-space: nowrap; padding-right: 18px; }
.at-note-row:hover .at-note-row__read { color: var(--accent); }

/* ---- speaking ---- */
.at-speaking-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(36px, 5vw, 72px); align-items: start; }
.at-talks { border-top: var(--rule) solid var(--line); }
.at-talk {
  display: grid; grid-template-columns: 118px minmax(0, 1fr) auto;
  gap: 24px; align-items: center;
  padding: 20px 0;
  border-bottom: var(--rule) solid var(--line);
  cursor: pointer; text-align: left;
  background: none; border-left: 0; border-right: 0; border-top: 0;
  width: 100%;
  transition: background .25s ease;
}
.at-talk:hover { background: var(--surface); }
.at-talk__frame {
  position: relative; aspect-ratio: 16 / 10;
  border: var(--rule) solid var(--line); overflow: hidden;
}
.at-talk__frame img { width: 100%; height: 100%; object-fit: cover; }
.at-talk__frame .at-slot { position: absolute; inset: 0; }
.at-talk__title { font-family: var(--serif); font-size: 19px; line-height: 1.35; color: var(--text); }
.at-talk__play { font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--dim); white-space: nowrap; padding-right: 18px; }
.at-talk:hover .at-talk__play { color: var(--accent); }

/* ============================================================
   Contact and forms
   ============================================================ */
.at-contact-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(36px, 5vw, 72px); align-items: start; }
.at-contact__title {
  font-family: var(--serif);
  font-size: clamp(32px, 3.8vw, 48px);
  line-height: 1.08; letter-spacing: -.02em; margin-bottom: 26px;
}
.at-contact__direct { margin-top: 30px; display: flex; flex-direction: column; gap: 9px; }
.at-contact__direct a { font-family: var(--serif); font-size: 20px; color: var(--text); }
.at-contact__direct a:hover { color: var(--accent); }
.at-contact__addr { font-size: 13.5px; color: var(--dim); line-height: 1.6; margin-top: 6px; }

.at-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.at-field { margin: 0 0 20px; }
.at-field label { display: block; margin-bottom: 8px; }
.at-field input, .at-field select, .at-field textarea {
  width: 100%; display: block;
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  color: var(--text); background: var(--surface);
  border: var(--rule) solid var(--line); border-radius: 0;
  padding: 13px 14px;
  transition: border-color .2s ease;
  -webkit-appearance: none; appearance: none;
}
.at-field textarea { min-height: 140px; resize: vertical; }
.at-field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 1px), calc(100% - 14px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
  padding-right: 42px;
}
.at-field input::placeholder, .at-field textarea::placeholder { color: var(--dim); }
.at-field input:focus, .at-field select:focus, .at-field textarea:focus { outline: none; border-color: var(--accent); }
.at-form__pot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.at-formnote {
  padding: 18px 20px; margin-bottom: 24px;
  background: var(--surface);
  font-family: var(--serif); font-size: 18px; line-height: 1.55;
}
.at-formnote--ok { border-left: 2px solid var(--accent); color: var(--text); }
.at-formnote--err { border-left: 2px solid var(--line-2); color: var(--muted); }

/* ---- email capture ---- */
.at-follow { border-top: var(--rule) solid var(--line); padding: clamp(44px, 5vw, 64px) 0; }
.at-follow__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 72px); align-items: center; }
.at-follow__title { font-family: var(--serif); font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; margin-top: 10px; }
.at-follow__form { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.at-follow__form input {
  flex: 1 1 260px;
  font-family: var(--sans); font-size: 16px;
  color: var(--text); background: var(--surface);
  border: var(--rule) solid var(--line); padding: 14px 15px;
}
.at-follow__form input:focus { outline: none; border-color: var(--accent); }
.at-follow__note { font-size: 12.5px; color: var(--dim); margin-top: 12px; }

/* ============================================================
   Footer
   ============================================================ */
.at-footer { border-top: var(--rule) solid var(--line); padding: 28px 0 46px; }
.at-footer__row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 12.5px; color: var(--dim); }
.at-footer__social { display: flex; gap: 22px; }
.at-footer a { color: var(--dim); }
.at-footer a:hover { color: var(--accent); }

/* ============================================================
   Video lightbox
   ============================================================ */
.at-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6, 9, 15, .95);
  display: none; align-items: center; justify-content: center; padding: 40px;
}
.at-modal.is-open { display: flex; }
.at-modal__box { width: min(1100px, 100%, calc((100dvh - 150px) * 16 / 9)); }
.at-modal__box.is-vertical { width: min(420px, 100%, calc((100dvh - 150px) * 9 / 16)); }
.at-modal__frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.at-modal__box.is-vertical .at-modal__frame { aspect-ratio: 9 / 16; }
.at-modal__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.at-modal__close {
  position: absolute; top: 20px; right: 26px; z-index: 2;
  background: none; border: 0; padding: 8px; cursor: pointer;
  color: var(--muted);
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.at-modal__close:hover { color: var(--accent); }
body.admin-bar .at-modal__close { top: 56px; }

/* ============================================================
   Inner pages, notes and prose
   ============================================================ */
.at-page { padding: clamp(52px, 6vw, 88px) 0 clamp(64px, 8vw, 104px); }
.at-page__head { max-width: 760px; margin-bottom: clamp(36px, 4vw, 56px); }
.at-page__title {
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.04; letter-spacing: -.022em; margin-top: 14px;
}
.at-page__meta { margin-top: 18px; font-size: 12.5px; color: var(--dim); letter-spacing: .04em; }

.at-prose { max-width: 66ch; }
.at-prose p, .at-prose ul, .at-prose ol, .at-prose blockquote {
  font-family: var(--serif);
  font-size: 19px; line-height: 1.74; font-weight: 300;
  color: var(--muted); margin: 0 0 24px;
}
.at-prose strong { color: var(--text); font-weight: 400; }
.at-prose em { font-style: italic; }
.at-prose h2, .at-prose h3 {
  font-family: var(--serif); color: var(--text);
  letter-spacing: -.015em; margin: 42px 0 16px;
}
.at-prose h2 { font-size: 27px; }
.at-prose h3 { font-size: 22px; }
.at-prose blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 22px; color: var(--text); font-style: italic;
}
.at-prose a { color: var(--accent); border-bottom: 1px solid var(--line-2); }
.at-prose a:hover { border-color: var(--accent); }
.at-prose ul, .at-prose ol { padding-left: 22px; }
.at-prose li { margin-bottom: 10px; }
.at-prose img { margin: 30px 0; border: var(--rule) solid var(--line); }

.at-backlink { margin-top: 56px; }

/* ---- talk cards on the speaking page ---- */
.at-topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; border-top: var(--rule) solid var(--line); padding-top: 34px; }
.at-topic__no { font-family: var(--serif); font-size: 15px; color: var(--accent); margin-bottom: 12px; }
.at-topic__title { font-family: var(--serif); font-size: clamp(21px, 2vw, 25px); line-height: 1.22; letter-spacing: -.012em; margin-bottom: 12px; }
.at-topic__text { color: var(--muted); font-size: 15.5px; line-height: 1.62; }

.at-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; border-top: var(--rule) solid var(--line); margin-top: 12px; }
.at-fact { padding: 18px 0; border-bottom: var(--rule) solid var(--line); display: flex; justify-content: space-between; gap: 20px; }
.at-fact__k { font-size: 12.5px; color: var(--dim); }
.at-fact__v { font-family: var(--serif); font-size: 17px; text-align: right; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1040px) {
  :root { --pad: 30px; }
  .at-hero__grid { grid-template-columns: 1fr; align-items: start; }
  .at-portrait { max-width: 340px; }
  .at-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .at-rail__item:nth-child(2) { border-right: 0; }
  .at-rail__item:nth-child(1), .at-rail__item:nth-child(2) { border-bottom: var(--rule) solid var(--line); }
  .at-rail__item:nth-child(3) { padding-left: 0; }
  .at-record { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .at-record__cell:nth-child(3n) { border-right: 0; }
  .at-profile, .at-speaking-grid, .at-contact-grid, .at-clients-grid, .at-follow__grid { grid-template-columns: 1fr; }
  .at-entry { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .at-entry__link { justify-self: start; text-align: left; padding-right: 0; }
  .at-note-row__read { padding-right: 0; }
  .at-note-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .at-topics { grid-template-columns: 1fr; }
  .at-facts { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --pad: 20px; }
  body { font-size: 16px; }
  .at-burger { display: block; }
  .at-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: var(--rule) solid var(--line);
    display: none;
  }
  .at-nav.is-open { display: block; }
  .at-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 6px var(--pad) 18px; }
  .at-nav li { border-bottom: var(--rule) solid var(--line); }
  .at-nav li:last-child { border-bottom: 0; }
  .at-nav a { display: block; padding: 15px 0; }
  .at-masthead__in { position: relative; }

  .at-films { grid-template-columns: 1fr; }
  .at-record { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .at-record__cell:nth-child(2n) { border-right: 0; }
  .at-talk { grid-template-columns: 84px minmax(0, 1fr); }
  .at-talk__play { display: none; }
  .at-form__row { grid-template-columns: 1fr; gap: 0; }
  .at-modal { padding: 18px; }
}
