/* ==========================================================================
   Digihack — base styles
   Design tokens, reset, typography, buttons, forms and shared utilities.
   Loaded on every page. (WordPress: enqueue as `digihack-base`.)
   ========================================================================== */

a {
  color: #ee5f25;
}

a:hover {
  color: #c8461a;
}

:root {
  --ink: #17151a;
  --text: #2a2622;
  --muted: #665d56;
  --line: #ece5df;
  --bg: #ffffff;
  --tint: #fff3ec;
  --accent: #ee5f25;
  --accent-dark: #c8461a;
  --brand: #ee5f25;
  --dark: #1d1b22;
  --on-dark: #f4efea;
  --on-dark-muted: #bdb4ad;
  --wa: #1d7a49;
}

body {
  font-family: "Hind",ui-sans-serif,system-ui,sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  margin: 0;
}

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

h1,
h2,
h3 {
  font-family: "Poppins",ui-sans-serif,system-ui,sans-serif;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
  text-wrap: balance;
}

p {
  margin: 0;
}

.wrap {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
}

.sec {
  padding: 5rem 0;
}

.sec-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
  margin-bottom: 40px;
}

.eyebrow {
  font: 600 13px/1 "Poppins",sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.h2 {
  font-size: 36px;
  font-weight: 600;
}

.lead {
  color: var(--muted);
  font-size: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  font: 600 16px/1 "Poppins",sans-serif;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-wa {
  background: var(--wa);
  color: #fff;
}

.btn-wa:hover {
  background: #155c37;
  color: #fff;
}

.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--ink);
  color: #fff;
}

.ph {
  border: 1.5px dashed #c9bdb3;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font: 500 14px/1 "Poppins",sans-serif;
  color: var(--ink);
}

.field input,
.field select {
  height: 48px;
  border: 1px solid #d9cfc7;
  border-radius: 8px;
  padding: 0 14px;
  font: 400 16px "Hind",sans-serif;
  color: var(--ink);
  background: #fff;
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form-note {
  font-size: 13px;
  color: var(--muted);
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 20px;
}

.sl-nav {
  display: none;
}

.swipe-hint {
  display: none;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font: 500 12px/1 "Poppins",sans-serif;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
}

.center {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.link-more {
  font: 600 15px/1 "Poppins",sans-serif;
  color: var(--accent);
  text-decoration: none;
  padding: 12px 0;
}

.pill {
  display: inline-block;
  align-self: flex-start;
  font: 600 12px/1 "Poppins",sans-serif;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--accent);
}

.row2 {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}

.field textarea {
  height: 104px;
  border: 1px solid #d9cfc7;
  border-radius: 8px;
  padding: 12px 14px;
  font: 400 16px "Hind",sans-serif;
  color: var(--ink);
  background: #fff;
  resize: vertical;
  width: 100%;
}

.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

@media (max-width:1024px) {
  .grid3 {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width:640px) {
  body {
    font-size: 16px;
  }

  .wrap {
    padding: 0 16px;
  }

  .sec {
    padding: 5rem 0;
  }

  .h2 {
    font-size: 27px;
  }

  .grid3 {
    grid-template-columns: minmax(0,1fr);
  }

  .m-slide {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: calc(100% - 48px);
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-right: -16px;
    padding-right: 16px;
    padding-bottom: 4px;
  }

  .m-slide::-webkit-scrollbar {
    display: none;
  }

  .m-slide>* {
    scroll-snap-align: start;
  }

  .sl-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
  }

  .sl-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid var(--ink);
    background: #fff;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .sl-btn:hover {
    background: var(--ink);
    color: #fff;
  }

  .sl-btn:disabled {
    opacity: .3;
    cursor: default;
    background: #fff;
    color: var(--ink);
  }

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

  .sl-count {
    font: 600 15px/1 "Poppins",sans-serif;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
  }

  .sl-nav.center {
    justify-content: center;
    gap: 28px;
  }

  .swipe-hint {
    display: block;
    margin-top: 14px;
    font: 600 14px/1 "Poppins",sans-serif;
    color: var(--accent);
  }

  .row2 {
    grid-template-columns: minmax(0,1fr);
  }
}

/* Visible keyboard focus for interactive elements */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

/* Slider arrows are a phone-only control */
@media (min-width: 641px) {
  .sl-nav {
    display: none;
  }
}

/* Skip link: hidden until focused with the keyboard */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font: 600 15px/1 "Poppins", sans-serif;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* ==========================================================================
   Motion — smooth interactions site-wide
   Keep durations short (150–350ms) and respect prefers-reduced-motion.
   ========================================================================== */
:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in: cubic-bezier(.4, 0, 1, 1);
}

html {
  scroll-behavior: smooth;
}

/* Anchored sections don't hide under the top of the screen */
[id] {
  scroll-margin-top: 20px;
}

/* Interactive elements ease between states instead of snapping */
a,
button,
.btn,
input,
select,
textarea {
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, opacity .2s ease, transform .2s var(--ease-out);
}

.btn:active {
  transform: translateY(1px) scale(.99);
}

/* Cards lift slightly on hover (no shadows, by design) */
.gc-row,
.ft,
.ty,
.cc,
.sv,
.area,
.post-feat,
.post-row,
.plan,
.review {
  transition: transform .25s var(--ease-out), border-color .2s ease, background-color .2s ease;
}

.ft:hover,
.ty:hover,
.cc:hover,
.area:hover,
.post-feat:hover,
.post-row:hover {
  transform: translateY(-3px);
}

/* Scroll reveal — added by main.js only when JS runs and motion is allowed */
.js-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.js-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* FAQ answers slide open (height animated in main.js) */
.faqs details > :not(summary) {
  overflow: hidden;
}

.faqs summary::after {
  transition: transform .25s var(--ease-out);
}

.faqs details[open] summary::after {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .js-reveal {
    opacity: 1;
    transform: none;
  }
}

/* Button icons (added by the build): even spacing on every page, arrow nudges on hover */
a.btn,
button.btn {
  gap: 9px;
}

.btn > .fi {
  flex: none;
}

.btn .bi-trail {
  transition: transform .25s var(--ease-out);
}

.btn:hover .bi-trail {
  transform: translateX(4px);
}

.btn:hover .bi-lead {
  animation: bi-pop .4s var(--ease-out);
}

@keyframes bi-pop {
  40% { transform: scale(1.18) rotate(-6deg); }
}

/* Real photos in place of initials / placeholders (added when the file exists) */
img.av {
  display: block;
  object-fit: cover;
  padding: 0;
}

.fd-ph.has-photo {
  align-self: stretch;
  margin: 32px 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: none;
}

.fd-ph.has-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

/* Real website screenshots inside the browser-style frames */
.frame-shot img,
.wk-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.frame-shot:has(img),
.wk-shot:has(img) {
  padding: 0;
  background: #fff;
}

.pf-line {
  margin: 6px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}

a.kp {
  display: block;
  text-decoration: none;
  color: inherit;
}

a.kp:hover h3 {
  color: var(--accent);
}

/* Portfolio filter chips are buttons */
.cats button {
  cursor: pointer;
}

.pf-card[hidden] {
  display: none !important;
}

/* No underlines on links anywhere (client request); links are told apart by colour and weight */
a,
a:hover,
a:focus,
a:active {
  text-decoration: none !important;
}

/* ==========================================================================
   Forms — honeypot, sending state and status message
   ========================================================================== */
.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

form[data-ajax-form] {
  position: relative;
}

form.is-sending button[type="submit"] {
  pointer-events: none;
  opacity: .75;
}

form.is-sending button[type="submit"]::after {
  content: "";
  width: 16px;
  height: 16px;
  margin-left: 10px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin .7s linear infinite;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.form-status {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  line-height: 1.45;
  background: #fdecea;
  color: #9e1c10;
  grid-column: 1 / -1;
  width: 100%;
}

.form-status.is-ok {
  background: #e3f3ea;
  color: #155c37;
}

.form-status a {
  color: inherit;
  font-weight: 600;
}

/* Dropdowns: our own chevron, inset from the edge (the native arrow sits flush right) */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23665d56' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  background-size: 16px 16px !important;
  padding-right: 44px !important;
  cursor: pointer;
}

select::-ms-expand {
  display: none;
}

/* Phone number in running text (tel_pass.py): bold + brand colour only */
.tel-hl {
  color: var(--accent) !important;
  font-weight: 700;
  white-space: nowrap;
  transition: color .2s ease;
}

a.tel-hl:hover,
a:hover > .tel-hl {
  color: var(--accent-dark) !important;
}

/* Phones: section headings fill the width (stack_pass.py) */
@media (max-width: 640px) {
  .sec-head {
    max-width: none;
  }

  h2,
  .h2 {
    text-wrap: pretty;
  }

  .h2,
  .cta h2,
  .cx-info h2,
  .sg-head h2,
  .cb-copy h2 {
    font-size: 23px;
    line-height: 1.25;
  }

  .sec-head .lead {
    font-size: 16px;
  }
}
