/*
 * Page-level layouts.
 *
 * @package Slyfox_Digital
 */

/* --------------------------------------------------------------------------
 * Shared two-column split
 * ------------------------------------------------------------------------ */
.sf-split { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 80px); align-items: center; }
.sf-split--top { align-items: flex-start; }
.sf-split__text { flex: 1 1 440px; min-width: 0; }
.sf-split__media { flex: 1 1 360px; min-width: 0; position: relative; }
.sf-split__media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--sf-r-lg); }

/* --------------------------------------------------------------------------
 * Home — service tiles
 * ------------------------------------------------------------------------ */
.sf-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(max(150px, min(300px, 40vw)), 1fr));
  gap: clamp(12px, 2vw, 24px);
}
.sf-tile {
  text-decoration: none; color: inherit;
  background: var(--sf-white);
  border: 1px solid var(--sf-border);
  border-radius: var(--sf-r-card);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color var(--sf-t);
}
.sf-tile:hover { border-color: var(--sf-orange); }
.sf-tile img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.sf-tile__body { padding: clamp(12px, 2vw, 20px) clamp(12px, 2vw, 24px) clamp(14px, 2vw, 24px); }
.sf-tile__body h3 { font-size: clamp(16px, 1.6vw, 22px); margin: 0 0 6px; }
.sf-tile__more { color: var(--sf-orange); font-family: var(--sf-font-head); font-weight: 700; font-size: 14px; }

.sf-tiles__closer {
  margin-top: 36px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.sf-tiles__closer h3 { font-size: clamp(24px, 2.6vw, 34px); max-width: 24ch; }
.sf-tiles__closer p { font-size: clamp(17px, 1.5vw, 20px); margin: 0 0 10px; opacity: .85; }
.sf-home-services { padding-bottom: clamp(40px, 4vw, 64px); }
.sf-home-intro { padding-top: clamp(48px, 5vw, 72px); }

/* Goals card (navy, on Home) */
.sf-goals {
  background: var(--sf-navy); color: var(--sf-white);
  border-radius: var(--sf-r-lg); padding: 28px 30px;
  position: relative; overflow: hidden;
}
.sf-goals img { position: absolute; right: -10%; bottom: -20%; width: 55%; opacity: .1; }
.sf-goals h3, .sf-goals ul { position: relative; }
.sf-goals h3 { color: var(--sf-white); }
.sf-goals ul { margin: 0; padding-left: 20px; font-size: 17px; line-height: 1.9; }

/* Prose blocks / accordions on Home */
.sf-cards2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(24px, 3vw, 48px);
}
.sf-cardstack { display: flex; flex-direction: column; gap: clamp(20px, 2vw, 32px); }
.sf-prosecard { background: var(--sf-white); border-radius: var(--sf-r-lg); padding: clamp(24px, 3vw, 40px); }
.sf-prosecard > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sf-prosecard ul { margin: 0 0 16px; padding-left: 22px; line-height: 1.8; }
.sf-prosecard p { line-height: 1.65; }

.sf-inline-acc > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.sf-inline-acc ul { margin: 0 0 20px; padding-left: 22px; line-height: 1.8; }

/* Video carousel */
.sf-vidnav { display: flex; gap: 8px; }
.sf-vidnav button {
  width: var(--sf-tap); height: var(--sf-tap); border-radius: 50%;
  font-size: 18px; cursor: pointer;
  transition: background var(--sf-t), color var(--sf-t);
}
.sf-vidnav__prev { border: 1px solid var(--sf-navy); background: var(--sf-white); color: var(--sf-navy); }
.sf-vidnav__prev:hover { background: var(--sf-navy); color: var(--sf-white); }
.sf-vidnav__next { border: 0; background: var(--sf-navy); color: var(--sf-white); }
.sf-vidnav__next:hover { background: var(--sf-orange); }

.sf-vidtrack {
  display: flex; gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-bottom: 4px;
}
.sf-vidtrack::-webkit-scrollbar { display: none; }
.sf-vid {
  flex: 0 0 min(100%, 360px); scroll-snap-align: start;
  position: relative; border-radius: var(--sf-r-card);
  overflow: hidden; background: var(--sf-navy);
}
.sf-vid img { width: 100%; aspect-ratio: 16/9; object-fit: cover; opacity: .92; }
.sf-vid__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.sf-vid__play span {
  width: 56px; height: 56px; border-radius: 50%; background: var(--sf-orange);
  display: flex; align-items: center; justify-content: center;
  color: var(--sf-white); font-size: 20px; padding-left: 4px;
}

/* Instagram grid */
.sf-ig { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.sf-ig img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--sf-r-input); }

/* --------------------------------------------------------------------------
 * Services
 * ------------------------------------------------------------------------ */
.sf-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.sf-feature { background: var(--sf-surface); border-radius: var(--sf-r-card); padding: 24px 28px; }
.sf-feature__head { display: flex; align-items: center; gap: 14px; }
.sf-feature__num { font-family: var(--sf-font-head); color: var(--sf-orange); font-weight: 800; font-size: 13px; letter-spacing: .06em; }
.sf-feature h3 { font-size: var(--sf-h3-small); letter-spacing: .02em; flex: 1; margin: 0; }
.sf-feature p { margin: 12px 0 0; font-size: 16px; line-height: 1.6; }
.sf-feature a { color: var(--sf-navy); }

.sf-captioned { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; margin-top: 48px; }
.sf-caption { position: relative; border-radius: var(--sf-r-lg); overflow: hidden; aspect-ratio: 4/3; }
.sf-caption img { width: 100%; height: 100%; object-fit: cover; }
.sf-caption__scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(38, 50, 76, .85), rgba(38, 50, 76, 0) 55%); }
.sf-caption h3 { position: absolute; left: 24px; bottom: 20px; margin: 0; color: var(--sf-white); font-size: 24px; }

/* --------------------------------------------------------------------------
 * Our Work
 * ------------------------------------------------------------------------ */
.sf-pills { display: flex; flex-wrap: wrap; gap: 10px; font-family: var(--sf-font-head); font-weight: 700; font-size: 15px; }
.sf-pill { color: var(--sf-white); border: 1px solid rgba(255, 255, 255, .4); text-decoration: none; padding: 9px 18px; border-radius: var(--sf-r-pill); }
.sf-pill--active { color: var(--sf-navy); background: var(--sf-white); border-color: var(--sf-white); padding: 10px 18px; }

.sf-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(max(150px, min(340px, 40vw)), 1fr)); gap: clamp(12px, 2vw, 24px); }
.sf-shot { text-decoration: none; color: inherit; display: block; }
.sf-shot__frame { border-radius: var(--sf-r-card); overflow: hidden; border: 1px solid var(--sf-border); background: var(--sf-surface); }
.sf-shot__chrome { height: 28px; background: var(--sf-border); display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.sf-shot__chrome span { width: 9px; height: 9px; border-radius: 50%; background: var(--sf-input-border); }
.sf-shot img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.sf-shot__meta { padding: 14px 4px 0; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.sf-shot__meta h3 { font-size: clamp(14px, 1.4vw, 18px); margin: 0; }
.sf-shot__meta span { font-size: 14px; opacity: .7; }

.sf-logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(100px, min(180px, 28vw)), 1fr)); gap: clamp(10px, 1.5vw, 16px); }
.sf-logo {
  aspect-ratio: 1; background: var(--sf-white); border-radius: var(--sf-r-card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; color: var(--sf-navy); border: 1px solid var(--sf-border);
}
.sf-logo__mark {
  width: 56px; height: 56px; border-radius: var(--sf-r-lg); background: var(--sf-navy);
  display: flex; align-items: center; justify-content: center;
  color: var(--sf-orange); font-family: var(--sf-font-head); font-weight: 800; font-size: 22px;
}
.sf-logo span:last-child { font-family: var(--sf-font-head); font-weight: 700; font-size: 14px; }
.sf-logo img { display: block; width: 78%; height: 62%; object-fit: contain; }

.sf-graphics { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(150px, min(260px, 40vw)), 1fr)); gap: clamp(12px, 2vw, 20px); }
.sf-graphic { display: block; text-decoration: none; color: inherit; }
.sf-graphic img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--sf-r-card); }
.sf-graphic div { padding: 12px 4px 0; font-family: var(--sf-font-head); font-weight: 700; font-size: 16px; color: var(--sf-navy); }

.sf-ctaband { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; position: relative; }
.sf-ctaband h2 { max-width: 22ch; margin: 0; }

/* --------------------------------------------------------------------------
 * About
 * ------------------------------------------------------------------------ */
.sf-yearbadge {
  position: absolute; left: -12px; bottom: -12px;
  background: var(--sf-orange); color: var(--sf-white);
  font-family: var(--sf-font-head); font-weight: 800;
  padding: 14px 18px; border-radius: var(--sf-r-tile); line-height: 1.1;
}
.sf-yearbadge__y { font-size: 28px; }
.sf-yearbadge__c { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .95; }

.sf-numcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.sf-numcard {
  background: var(--sf-white); border-radius: var(--sf-r-card);
  padding: 24px; border-top: 3px solid var(--sf-orange);
  font-size: 17px; line-height: 1.5;
}
.sf-numcard__n { font-family: var(--sf-font-head); color: var(--sf-orange); font-weight: 800; font-size: 13px; margin-bottom: 8px; }

.sf-kicker {
  font-family: var(--sf-font-head); font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 800; color: var(--sf-navy); margin: 36px 0 0; line-height: 1.3;
}
.sf-kicker span { color: var(--sf-orange); }

.sf-quicklinks {
  display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: center;
  font-family: var(--sf-font-head); font-weight: 700; font-size: 15px;
}
.sf-quicklinks a { color: var(--sf-white); text-decoration: none; }
.sf-quicklinks a:hover { color: var(--sf-orange); }

/* --------------------------------------------------------------------------
 * Team — flip cards
 * ------------------------------------------------------------------------ */
.sf-hint {
  margin-top: 28px; display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--sf-r-pill); padding: 8px 16px; font-size: 14px;
}
.sf-hint__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sf-orange); }

.sf-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(150px, min(300px, 40vw)), 1fr)); gap: clamp(12px, 2vw, 24px); }
.sf-people--wide { grid-template-columns: repeat(auto-fill, minmax(max(150px, min(270px, 40vw)), 1fr)); }

.sf-flip { perspective: 1400px; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; width: 100%; }
.sf-flip__inner { display: grid; width: 100%; transform-style: preserve-3d; transition: transform var(--sf-t-flip); }
.sf-flip:hover .sf-flip__inner,
.sf-flip.is-pinned .sf-flip__inner { transform: rotateY(180deg); }

.sf-flip__face {
  grid-area: 1/1; position: relative;
  backface-visibility: hidden;
  border-radius: var(--sf-r-xl); overflow: hidden;
  display: flex; flex-direction: column; min-height: 430px;
}
.sf-flip__front { background: var(--sf-white); border: 1px solid var(--sf-border); }
.sf-flip__back { transform: rotateY(180deg); background: var(--sf-navy); color: var(--sf-white); }
.sf-flip__face img { width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: top; background: var(--sf-surface); }
.sf-flip__back img { background: var(--sf-ink); }
.sf-flip__body { padding: clamp(12px, 2vw, 20px) clamp(12px, 2vw, 22px) clamp(14px, 2vw, 24px); flex: 1; display: flex; flex-direction: column; gap: 8px; }
.sf-flip__nameline { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sf-flip__body h3 { font-size: clamp(16px, 1.6vw, 22px); margin: 0; letter-spacing: .02em; }
.sf-flip__back h3 { color: var(--sf-white); }
.sf-flip__badge {
  font-family: var(--sf-font-head); font-size: 12px; font-weight: 700;
  color: var(--sf-orange); letter-spacing: .06em; text-transform: uppercase;
  flex-shrink: 0; white-space: nowrap;
}
.sf-flip__role { font-family: var(--sf-font-head); font-weight: 700; font-size: 14px; color: var(--sf-orange); font-style: italic; }
.sf-flip__fox { font-family: var(--sf-font-head); font-weight: 800; font-size: 14px; color: var(--sf-orange); letter-spacing: .08em; text-transform: uppercase; }
.sf-flip__body p { margin: 4px 0 0; font-size: clamp(13px, 1.1vw, 15px); line-height: 1.55; }
.sf-flip__back p { opacity: .92; }

@media (max-width: 640px) {
  .sf-flip__face { min-height: 0; }
}

/* --------------------------------------------------------------------------
 * Blog
 * ------------------------------------------------------------------------ */
.sf-bloglayout { display: flex; flex-wrap: wrap; gap: clamp(32px, 4vw, 64px); align-items: flex-start; }
.sf-bloglayout__main { flex: 1 1 560px; min-width: 0; }
.sf-bloglayout__aside { flex: 1 1 260px; max-width: 340px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }

.sf-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 28px; }
.sf-post { display: flex; flex-direction: column; gap: 12px; }
.sf-post > a:first-child { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--sf-r-card); background: var(--sf-surface); }
.sf-post > a:first-child img { width: 100%; height: 100%; object-fit: cover; }
.sf-post__date { margin: 0; font-family: var(--sf-font-head); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sf-orange); }
.sf-post h3 { margin: 0; font-size: 20px; line-height: 1.25; }
.sf-post h3 a { color: var(--sf-navy); text-decoration: none; }
.sf-post h3 a:hover { color: var(--sf-orange); }
.sf-post p { margin: 0; font-size: 15px; line-height: 1.6; opacity: .9; }
.sf-post__more { align-self: flex-start; }

.sf-pager { display: flex; align-items: center; gap: 6px; margin-top: 48px; font-family: var(--sf-font-head); font-weight: 700; font-size: 15px; flex-wrap: wrap; }
.sf-pager .nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sf-pager .page-numbers {
  width: var(--sf-tap); height: var(--sf-tap);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--sf-r-input); border: 1px solid var(--sf-border);
  color: var(--sf-navy); text-decoration: none;
}
.sf-pager .page-numbers.current { background: var(--sf-navy); border-color: var(--sf-navy); color: var(--sf-white); }
.sf-pager .page-numbers.dots { border: 0; width: auto; padding: 0 6px; opacity: .6; }
.sf-pager .next, .sf-pager .prev { width: auto; padding: 0 16px; }

.sf-widget > summary {
  display: flex; justify-content: space-between; align-items: center;
  margin: 0 0 12px; padding-bottom: 10px; border-bottom: 2px solid var(--sf-orange);
}
.sf-widget h2 { font-size: 18px; margin: 0; }
.sf-widget ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.sf-widget ul a { color: var(--sf-ink); text-decoration: none; }
.sf-widget ul a:hover { color: var(--sf-orange); }
.sf-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-tags a { font-size: 13px; color: var(--sf-navy); text-decoration: none; background: var(--sf-surface); border-radius: var(--sf-r-pill); padding: 5px 11px; }
.sf-tags a:hover { background: var(--sf-orange); color: var(--sf-white); }

/* Individual posts should remain focused on the article and its own comments.
 * The legacy Recent Comments widget included a stray site-wide comment in the
 * right rail, which read as though it belonged to the article. */
.single .sf-bloglayout__aside .widget_recent_comments,
.single .sf-bloglayout__aside .wp-block-latest-comments { display: none; }

/* --------------------------------------------------------------------------
 * Contact — Gravity Forms restyle
 * ------------------------------------------------------------------------ */
.sf-contactlayout { display: flex; flex-wrap: wrap; gap: clamp(32px, 4vw, 64px); align-items: flex-start; }
.sf-contactlayout__form { flex: 1 1 560px; min-width: 0; }
.sf-contactlayout__aside { flex: 1 1 280px; max-width: 380px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }

.sf-followcard {
  background: var(--sf-navy); color: var(--sf-white);
  border-radius: var(--sf-r-lg); padding: 28px;
  position: relative; overflow: hidden;
}
.sf-followcard img { position: absolute; right: -18%; bottom: -22%; width: 70%; opacity: .1; }
.sf-followcard h2 { font-size: 24px; margin: 0 0 16px; letter-spacing: .02em; color: var(--sf-white); position: relative; }
.sf-followcard ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-family: var(--sf-font-head); font-weight: 700; font-size: 15px; position: relative; }
.sf-followcard a { color: var(--sf-white); text-decoration: none; }
.sf-followcard a:hover { color: var(--sf-orange); }

.sf-visitcard { background: var(--sf-surface); border-radius: var(--sf-r-lg); padding: 24px; font-size: 16px; line-height: 1.6; }
.sf-visitcard__title { font-family: var(--sf-font-head); font-weight: 700; font-size: 14px; color: var(--sf-navy); margin-bottom: 6px; }
.sf-visitcard a { color: var(--sf-ink); text-decoration: none; }
.sf-visitcard a:hover { color: var(--sf-orange); }

/*
 * Gravity Forms restyle. The form itself is not rebuilt — these rules only
 * skin the plugin's own markup to match the design.
 */
.sf-gform .gform_wrapper .gfield_label {
  font-family: var(--sf-font-head); font-weight: 700; font-size: 14px; color: var(--sf-navy);
}
.sf-gform .gform_wrapper .gfield_required { color: var(--sf-orange); }
.sf-gform .gform_wrapper input[type="text"],
.sf-gform .gform_wrapper input[type="email"],
.sf-gform .gform_wrapper input[type="tel"],
.sf-gform .gform_wrapper input[type="url"],
.sf-gform .gform_wrapper input[type="number"],
.sf-gform .gform_wrapper select,
.sf-gform .gform_wrapper textarea {
  border: 1px solid var(--sf-input-border);
  border-radius: var(--sf-r-input);
  padding: 0 14px;
  font-size: 16px;
  font-family: var(--sf-font-body);
  min-height: 48px;
  width: 100%;
}
.sf-gform .gform_wrapper textarea { padding: 12px 14px; resize: vertical; min-height: 140px; }
.sf-gform .gform_wrapper input:focus,
.sf-gform .gform_wrapper textarea:focus,
.sf-gform .gform_wrapper select:focus { border-color: var(--sf-orange); outline: none; }
.sf-gform .gform_wrapper .gfield_checkbox .gchoice,
.sf-gform .gform_wrapper .gfield_radio .gchoice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}
.sf-gform .gform_wrapper .gfield_checkbox .gfield-choice-input,
.sf-gform .gform_wrapper .gfield_radio .gfield-choice-input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 0;
}
.sf-gform .gform_wrapper .gfield_checkbox .gchoice label,
.sf-gform .gform_wrapper .gfield_radio .gchoice label {
  display: block;
  min-height: 0;
  margin: 0;
  font-size: 16px;
}
.sf-gform .gform_wrapper fieldset {
  border: 1px solid var(--sf-border); border-radius: var(--sf-r-tile);
  padding: 16px 18px; margin: 0; background: var(--sf-surface);
}
.sf-gform .gform_wrapper legend {
  font-family: var(--sf-font-head); font-weight: 700; font-size: 14px;
  color: var(--sf-navy); padding: 0 6px;
}
.sf-gform .gform_wrapper .gform_footer input[type="submit"],
.sf-gform .gform_wrapper .gform_button {
  background: var(--sf-orange); color: var(--sf-white); border: 0;
  font-family: var(--sf-font-head); font-weight: 700; font-size: 17px;
  padding: 16px 32px; border-radius: var(--sf-r-btn); cursor: pointer;
  transition: background var(--sf-t), transform var(--sf-t), box-shadow var(--sf-t);
}
.sf-gform .gform_wrapper .gform_footer input[type="submit"]:hover,
.sf-gform .gform_wrapper .gform_button:hover {
  background: var(--sf-navy); transform: translateY(-2px); box-shadow: var(--sf-shadow-btn);
}

/* --------------------------------------------------------------------------
 * Editor content (single posts, generic pages)
 * ------------------------------------------------------------------------ */
.sf-prose { max-width: 70ch; font-size: 17px; line-height: 1.65; }
.sf-prose h2 { font-size: var(--sf-h2); margin: 48px 0 16px; }
.sf-prose h3 { font-size: var(--sf-h3-card); margin: 40px 0 12px; }
.sf-prose ul, .sf-prose ol { padding-left: 22px; line-height: 1.8; }
.sf-prose img { border-radius: var(--sf-r-card); }
.sf-prose > *:first-child { margin-top: 0; }
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text, .wp-element-caption { font-size: 15px; opacity: .8; margin-top: 8px; }

@media (max-width: 768px) {
  .sf-people { grid-template-columns: repeat(2, 1fr); }
  .sf-logos { grid-template-columns: repeat(3, 1fr); }
  .sf-tiles { grid-template-columns: repeat(2, 1fr); }
}
