/* ==========================================================================
   Poty Ferraz landing page
   Mobile-first. Fluid values interpolate between the Figma mobile frame
   (393px) and desktop frame (1440px) via clamp().
   ========================================================================== */

:root {
  --color-bg: #1d1d1d;
  --color-surface: #2f2f2f;
  --color-line: #363636;
  --color-muted: #8b8b8b;
  --color-text: #ffffff;
  --color-text-soft: #d9d9d9;
  --color-button-dark: #1e1e1e;

  --font-family: "Kodchasan", system-ui, sans-serif;

  --content-width: 65rem;              /* 1040px */
  --gutter: clamp(2rem, 1.25rem + 3vw, 3.5rem);
  --space-section: clamp(3.5rem, 2.4rem + 4.5vw, 6rem);   /* ~90px desktop */

  --text-display: clamp(1rem, 0.437rem + 2.292vw, 2.5rem);   /* 16 → 40 */
  --text-title: clamp(1.25rem, 0.969rem + 1.146vw, 2rem);    /* 20 → 32 */
  --text-button: clamp(1rem, 0.906rem + 0.382vw, 1.25rem);   /* 16 → 20 */
  --text-body: clamp(0.875rem, 0.828rem + 0.191vw, 1rem);    /* 14 → 16 */
  --text-eyebrow: clamp(0.625rem, 0.531rem + 0.382vw, 0.875rem); /* 10 → 14 */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-height: clamp(5rem, 4rem + 3vw, 5.75rem);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-weight: 300;
  font-size: var(--text-body);
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.is-menu-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
blockquote {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--color-text);
  color: var(--color-bg);
  font-weight: 500;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.container {
  width: 100%;
  max-width: calc(var(--content-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Shared pieces ---------- */

.eyebrow {
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 1.05em;
  line-height: 1.3;
  text-transform: uppercase;
}

.section-title {
  font-size: var(--text-title);
  font-weight: 500;
  line-height: 1.3;
}

.section-heading {
  display: grid;
  gap: clamp(1.5rem, 1.2rem + 1vw, 1.5625rem);
}

.section-heading--centered {
  text-align: center;
}

.section-heading--centered .eyebrow {
  /* Letter-spacing adds trailing space after the last glyph; offset it so the word looks centered. */
  margin-right: -1.05em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(15.5rem, 14.2rem + 5.4vw, 18.75rem);  /* 248 → 300 */
  min-height: clamp(2.75rem, 2.6rem + 0.6vw, 3.125rem); /* 44 → 50 */
  padding: 0.5rem 2rem;
  border-radius: 999px;
  font-size: var(--text-button);
  font-weight: 500;
  line-height: 1.3;
  text-transform: uppercase;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out);
}

.button--dark {
  background: var(--color-button-dark);
  color: var(--color-text);
}

.button--light {
  background: var(--color-muted);
  color: var(--color-line);
}

@media (hover: hover) {
  .button--dark:hover {
    background: var(--color-text);
    color: var(--color-button-dark);
  }

  .button--light:hover {
    background: var(--color-text-soft);
  }
}

.full-bleed {
  width: 100%;
  object-fit: cover;
}

.full-bleed--essence {
  height: clamp(15rem, 31.25vw, 35rem);
  object-position: 50% 90%;
}

.full-bleed--plaque {
  height: clamp(9.5rem, 18.2vw, 20rem);
}

.full-bleed--lake {
  height: clamp(14rem, 31.25vw, 35rem);
  object-position: 50% 15%;
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  height: var(--header-height);
  padding-inline: clamp(1.75rem, 1.5rem + 1vw, 2.7rem);
}

.site-header__logo img {
  width: clamp(9.5rem, 8.9rem + 2.4vw, 12.2rem);  /* 152 → 195 */
  height: auto;
}

.site-header__tagline {
  display: none;
  font-size: 0.9375rem;
  font-weight: 300;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-header__contact {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  font-weight: 500;
  font-size: 1.0625rem;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

.site-header__contact-label {
  display: none;
}

.site-header__divider {
  font-weight: 700;
  font-size: 0.8125rem;
}

.menu-toggle {
  position: relative;
  display: grid;
  align-content: center;
  gap: 2px;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.4rem;
  padding-inline: 0.4rem;
  z-index: 40;
}

.menu-toggle__bar {
  display: block;
  width: 31px;
  height: 3px;
  border-radius: 9px;
  background: var(--color-text-soft);
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

@media (hover: hover) {
  .site-header__contact:hover {
    opacity: 0.7;
  }
}

@media (min-width: 640px) {
  .site-header__contact-label {
    display: inline;
  }
}

@media (min-width: 1024px) {
  .site-header {
    grid-template-columns: 1fr auto 1fr;
  }

  .site-header__tagline {
    display: block;
  }

  .site-header__actions {
    justify-self: end;
  }
}

/* ---------- Menu overlay ---------- */

.site-menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: var(--header-height) var(--gutter);
  background: rgb(29 29 29 / 0.97);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.site-menu[hidden] {
  display: none;
}

.site-menu.is-open {
  opacity: 1;
}

.site-menu__list {
  display: grid;
  gap: 1.75rem;
  text-align: center;
}

.site-menu__list a {
  font-size: var(--text-title);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}

@media (hover: hover) {
  .site-menu__list a:hover {
    color: var(--color-muted);
  }
}

/* When the menu is open the header must sit above the overlay so the close button stays reachable. */
body.is-menu-open .site-header {
  position: fixed;
  z-index: 40;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(32rem, 75svh, 36rem);
  overflow: hidden;
  isolation: isolate;
}

.hero__image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    rgb(23 23 23 / 0.81) 0%,
    #909090 46.6%,
    rgb(23 23 23 / 0.81) 100%
  );
  mix-blend-mode: multiply;
  opacity: 0.7;
}

.hero__content {
  display: grid;
  justify-items: center;
  gap: clamp(6.5rem, 6rem + 2vw, 7.4rem);
  padding-top: clamp(5.5rem, 4rem + 4vw, 6rem);
}

.hero__seal img {
  width: clamp(11.1rem, 8.5rem + 10.8vw, 19.75rem);  /* 178 → 316 */
  height: auto;
}

@media (min-width: 768px) {
  .hero {
    height: clamp(36rem, 100svh, 55rem);
  }
}

/* ---------- Intro + story ---------- */

.intro {
  padding-top: clamp(2.7rem, 2rem + 2.8vw, 4.7rem);
}

.intro__title {
  padding-inline: var(--gutter);
  font-size: var(--text-display);
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

.intro__title strong {
  font-weight: 700;
}

.story {
  display: grid;
  gap: clamp(2.5rem, 2rem + 2vw, 3rem);
  margin-top: clamp(2.7rem, 2rem + 3vw, 5.9rem);
}

.story__media {
  justify-self: center;
  width: min(100%, 11.6rem);
  aspect-ratio: 186 / 174;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-line);
}

.story__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.story__body {
  display: grid;
  align-content: start;
  gap: 1.1em;
}

.story__title {
  margin-bottom: clamp(1.25rem, 1rem + 1.2vw, 2.4rem);
  font-size: var(--text-title);
  font-weight: 500;
  line-height: 1.3;
  max-width: 12em;
}

.story__body p {
  max-width: 32rem;
}

.intro__cta {
  display: flex;
  justify-content: center;
  padding: clamp(3.5rem, 3rem + 2vw, 5.1rem) var(--gutter) 0;
}

@media (min-width: 900px) {
  .story {
    grid-template-columns: minmax(0, 504fr) minmax(0, 513fr);
    gap: clamp(1.5rem, 2.2vw, 2.25rem);
    align-items: start;
  }

  .story__media {
    width: 100%;
    aspect-ratio: 504 / 471;
    border-radius: 23px;
  }

  .story__body {
    padding-top: 1.4rem;
  }
}

/* Reveal: mirrors the Figma smart-animate (photo from the left, text from the right, 1.3s ease-out).
   Only applied when JS is running so content is never stuck hidden. */
.js [data-reveal] .story__media,
.js [data-reveal] .story__body {
  opacity: 0;
  transition: opacity 1.3s var(--ease-out), transform 1.3s var(--ease-out);
}

.js [data-reveal] .story__media {
  transform: translateX(-30vw);
}

.js [data-reveal] .story__body {
  transform: translateX(30vw);
}

.js [data-reveal].is-revealed .story__media,
.js [data-reveal].is-revealed .story__body {
  opacity: 1;
  transform: none;
}

/* ---------- Essence ---------- */

.essence {
  padding-top: var(--space-section);
}

.essence .section-heading {
  margin-bottom: clamp(1.5rem, 1.2rem + 1vw, 1.5625rem);
}

.pillars {
  display: grid;
  gap: clamp(3rem, 2.5rem + 2vw, 3.5rem);
  padding-top: clamp(3.4rem, 3rem + 2vw, 5rem);
}

.pillar {
  display: grid;
  gap: clamp(1.9rem, 1.7rem + 0.8vw, 2.95rem);
  align-content: start;
}

.pillar__title {
  font-size: clamp(0.6875rem, 0.616rem + 0.287vw, 0.875rem);  /* 11 → 14 */
  font-weight: 700;
  letter-spacing: 1.05em;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(2rem, 4vw, 3.5rem);
  }
}

/* ---------- Legacy (accordion) ---------- */

.legacy {
  padding-top: clamp(5rem, 3rem + 8vw, 19rem);
  padding-bottom: var(--space-section);
}

.accordion {
  /* The divider lines extend 37px past the text column on desktop, as in the design. */
  --accordion-bleed: clamp(0rem, -2rem + 4vw, 2.3rem);
  width: 100%;
  max-width: calc(var(--content-width) + var(--accordion-bleed) * 2 + var(--gutter) * 2);
  margin-inline: auto;
  margin-top: clamp(2.5rem, 1.5rem + 3.5vw, 5.4rem);
  padding-inline: var(--gutter);
}

.accordion__item {
  border-bottom: 1px solid var(--color-line);
}

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: clamp(1.25rem, 1rem + 1vw, 2rem) calc(var(--accordion-bleed) + 1.5rem) clamp(1.25rem, 1rem + 1vw, 2rem) var(--accordion-bleed);
  font-size: clamp(0.9375rem, 0.82rem + 0.478vw, 1.25rem);  /* 15 → 20 */
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  text-transform: uppercase;
  color: var(--color-text);
  transition: color 0.3s var(--ease-out);
}

.accordion__item:first-child .accordion__trigger {
  padding-top: 0;
}

.accordion__chevron {
  flex: none;
  transition: transform 0.5s var(--ease-out);
}

.accordion__trigger[aria-expanded="true"] .accordion__chevron {
  transform: rotate(180deg);
}

@media (hover: hover) {
  .accordion__trigger:hover {
    color: var(--color-muted);
  }
}

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.5s var(--ease-out), visibility 0s linear 0.5s;
}

.accordion__item.is-open .accordion__panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.5s var(--ease-out), visibility 0s;
}

.accordion__content {
  overflow: hidden;
  min-height: 0;
}

.accordion__content p {
  max-width: 33rem;
  padding: 0 var(--accordion-bleed) clamp(1.5rem, 1rem + 2vw, 3.25rem);
  font-size: clamp(0.9375rem, 0.82rem + 0.478vw, 1.25rem);
  line-height: 1.3;
  box-sizing: content-box;
}

/* ---------- Testimonials ---------- */

.testimonials {
  padding-top: var(--space-section);
}

.testimonials .section-heading {
  gap: clamp(1.5rem, 1rem + 3vw, 4.4rem);
  margin-bottom: clamp(2.5rem, 2rem + 3vw, 5.5rem);
}

@media (max-width: 767px) {
  .testimonials .section-heading {
    text-align: left;
  }

  .testimonials .section-heading .eyebrow {
    margin-right: 0;
  }
}

.carousel {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--carousel-inset);
  scrollbar-width: none;
  --carousel-inset: max(var(--gutter) - 0.75rem, 1.1rem);
}

.carousel + .carousel {
  margin-top: clamp(1.25rem, 0.5rem + 3vw, 5.6rem);
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel:focus-visible {
  outline-offset: -2px;
}

.carousel.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

@media (hover: hover) and (pointer: fine) {
  .carousel {
    cursor: grab;
  }
}

.carousel__track {
  display: flex;
  gap: clamp(0.75rem, 0.6rem + 0.4vw, 1.0625rem);
  width: max-content;
  padding-inline: var(--carousel-inset);
}

.testimonial {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: clamp(16.5rem, 74vw, 25.75rem);  /* up to 412px */
  padding: clamp(1.75rem, 1.5rem + 1vw, 2.7rem) clamp(1.5rem, 1.1rem + 1.6vw, 3.05rem) clamp(2rem, 1.5rem + 2vw, 3rem);
  border-radius: 28px;
  background: var(--color-surface);
  scroll-snap-align: start;
}

.testimonial__photo {
  width: clamp(8.5rem, 7.2rem + 4vw, 12.5rem);  /* 137 → 200 */
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-line);
  pointer-events: none;
}

.testimonial__name {
  margin-top: clamp(1rem, 0.8rem + 0.6vw, 1.2rem);
  color: var(--color-text-soft);
  font-size: clamp(1rem, 0.8rem + 0.765vw, 1.5rem);  /* 16 → 24 */
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
}

.testimonial__role {
  color: var(--color-text-soft);
  font-size: clamp(0.75rem, 0.68rem + 0.29vw, 0.9375rem);  /* 12 → 15 */
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
}

.testimonial__quote {
  display: grid;
  gap: 1.3em;
  align-self: stretch;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.3;
}

/* ---------- Closing ---------- */

.closing {
  padding-top: var(--space-section);
}

.closing__title {
  margin-bottom: clamp(1.6rem, 1rem + 2.5vw, 5.6rem);
  font-size: clamp(1rem, 0.719rem + 1.146vw, 2rem);  /* 16 → 32 */
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

/* ---------- Footer ---------- */

.site-footer {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: clamp(3.5rem, 1rem + 9vw, 9.1875rem);   /* 56 → 147 */
  padding-block: clamp(4rem, 3rem + 4vw, 8.4rem) clamp(3.5rem, 1rem + 11vw, 11.5rem);
}

.site-footer__seal {
  width: clamp(8rem, 6.5rem + 4vw, 11.9rem);
  height: auto;
}

.site-footer__content {
  display: grid;
  gap: clamp(1.5rem, 1.1rem + 1.6vw, 1.9375rem);
  width: 100%;
  /* Wider than .container: in Figma the footer band runs almost edge to edge. */
  max-width: calc(83.75rem + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(2rem, 1.4rem + 2.4vw, 3.5rem);
}

.site-footer__identity {
  display: grid;
  gap: 0.375rem;
}

.site-footer__name {
  margin: 0;
  font-size: clamp(1.5rem, 1.078rem + 1.719vw, 2.25rem);  /* 24 → 36 */
  font-weight: 500;
  line-height: 1.3;
}

.site-footer__creci {
  margin: 0;
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.37em;
  line-height: 1.3;
  text-transform: uppercase;
}

.site-footer__rule {
  width: 100%;
  margin: 0;
  border: 0;
  border-top: 1px solid #3c3c3c;
}

.site-footer__place {
  margin: 0;
  font-size: clamp(0.75rem, 0.672rem + 0.318vw, 1rem);   /* 12 → 16 */
  font-weight: 500;
  letter-spacing: 0.44em;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
  /* Letter-spacing adds trailing space after the last glyph; offset it so the line looks centered. */
  margin-right: -0.44em;
}

/* ---------- Social icons ---------- */

.social {
  --social-icon: clamp(1.875rem, 1.43rem + 1.81vw, 2.8125rem);  /* 30 → 45 */

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1rem, 0.7rem + 1.16vw, 1.625rem);   /* 16 → 26 */
}

.social__link {
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;   /* keeps a comfortable tap target on small icons */
  color: #606060;
  transition: color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.social__icon {
  display: block;
  height: auto;
}

/* Widths keep each glyph at its Figma proportion relative to the 45px WhatsApp icon. */
.social__icon--whatsapp  { width: var(--social-icon); }
.social__icon--email     { width: calc(var(--social-icon) * 1.067); }
.social__icon--instagram { width: calc(var(--social-icon) * 0.956); }
.social__icon--linkedin  { width: calc(var(--social-icon) * 0.913); }

@media (hover: hover) {
  .social__link:hover {
    color: var(--color-text);
    transform: translateY(-2px);
  }
}

/* ---------- Reduced motion ---------- */

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .js [data-reveal] .story__media,
  .js [data-reveal] .story__body {
    opacity: 1;
    transform: none;
  }
}
