/*
Theme Name: Segures
Description: Tema editorial e de pedidos de contacto da Segures.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: segureis
*/

:root {
  --paper: #f9f8f2;
  --white: #fff;
  --navy: #142736;
  --evergreen: #204a43;
  --evergreen-deep: #173a35;
  --gold: #f4bc55;
  --ink-secondary: #4f6269;
  --line: #dedfd5;
  --mist: #e9eee8;
  --cream: #efece1;
  --radius: 22px;
  --shell: 1160px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 85px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--evergreen); text-underline-offset: .2em; }
a:hover { color: var(--evergreen-deep); }
a[href], button, summary { cursor: pointer; }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #aa5a15; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: inherit; }
h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.042em;
  line-height: 1.07;
  text-wrap: balance;
}
h1 { font-size: clamp(2.8rem, 5.3vw, 5.05rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3.4rem); }
h3 { font-weight: 700; line-height: 1.25; }
::selection { background: var(--gold); color: var(--navy); }

.shell { width: min(var(--shell), calc(100% - 3.5rem)); margin-inline: auto; }
.site-header { background: var(--white); border-bottom: 1px solid #e8e9e1; position: relative; z-index: 3; }
.header-row { min-height: 75px; display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  flex: none;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1.76rem;
  font-weight: 700;
  letter-spacing: -.07em;
  line-height: 1;
  text-decoration: none;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 35px;
  height: 35px;
  flex: none;
  border-radius: 10px;
  background: var(--evergreen);
  color: var(--gold);
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-dot, .hero-period { color: #a45b20; }
.site-nav, .site-nav ul { display: flex; align-items: center; gap: clamp(.8rem, 2.4vw, 2rem); }
.site-nav ul, .site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--navy);
  font-size: .91rem;
  font-weight: 650;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current='page'] { color: var(--evergreen); text-decoration: underline; }
.header-cta { flex: none; }
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--evergreen);
  background: var(--white);
}
.menu-toggle svg { margin-inline: auto; }

.hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 6vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); align-items: center; gap: clamp(2rem, 5vw, 4.8rem); }
.hero-copy { position: relative; z-index: 1; }
.hero-kicker, .eyebrow {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  margin-bottom: .85rem;
  color: var(--evergreen);
  font-size: .8125rem;
  font-weight: 750;
  letter-spacing: .085em;
  line-height: 1.4;
  text-transform: uppercase;
}
.hero-kicker::before, .eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #7e9c78; }
.hero-copy h1 { font-size: clamp(2.8rem, 5vw, 4.65rem); }
.hero-copy h1 + p, .hero-copy > p:not([class]), .hero-copy .hero-intro {
  max-width: 48ch;
  margin-top: clamp(1.05rem, 2.2vw, 1.55rem);
  color: var(--ink-secondary);
  font-size: clamp(1rem, 1.65vw, 1.18rem);
}
.hero-photo { position: relative; min-width: 0; margin: 0; isolation: isolate; }
.hero-photo::before {
  content: '';
  position: absolute;
  z-index: -1;
  right: -14px;
  bottom: -14px;
  width: 46%;
  height: 57%;
  background: #e6e9dc;
  border-radius: var(--radius);
}
.hero-photo img { width: 100%; aspect-ratio: 1.1; object-fit: cover; border-radius: var(--radius); }
.hero-photo figcaption { margin-top: .55rem; color: var(--ink-secondary); font-size: .875rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-top: 1.7rem; }
.hero-note { display: flex; align-items: center; gap: .55rem; margin-top: 1.05rem; color: var(--ink-secondary); font-size: .875rem; }
.hero-note svg { width: 19px; height: 19px; color: var(--evergreen); flex: none; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .55rem;
  min-height: 49px;
  padding: .67rem 1.22rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--evergreen);
  color: var(--white);
  font-size: .94rem;
  font-weight: 730;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.button svg { width: 1rem; height: 1rem; flex: none; }
.button:hover { background: var(--evergreen-deep); color: var(--white); }
.button-primary, .button-light { background: var(--gold); color: var(--navy); }
.button-primary:hover, .button-light:hover { background: #f8cb76; color: var(--navy); }
.button-secondary { background: transparent; border-color: #b7c1b5; color: var(--evergreen); }
.button-secondary:hover { color: var(--evergreen-deep); border-color: var(--evergreen); background: var(--mist); }
.button:disabled, .button[aria-disabled='true'] { opacity: .63; cursor: default; }
.header-cta.button, .header-cta .button { min-height: 43px; padding: .57rem 1rem; }

.section { padding-block: clamp(3.2rem, 7vw, 6rem); }
.section-head { margin: 0 0 clamp(1.4rem, 3.5vw, 2.6rem); }
.section-head h2 { max-width: 24ch; }
.section-head p:not(.eyebrow) { max-width: 64ch; margin-top: .9rem; color: var(--ink-secondary); }
.cards, .steps, .guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.85rem, 2.1vw, 1.4rem); }
.product-card, .guide-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  padding: clamp(1.2rem, 2.8vw, 2rem);
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.product-card:hover, .guide-card:hover { border-color: #8daba0; color: var(--navy); box-shadow: 0 12px 30px rgb(26 53 44 / .06); }
.product-card h3, .guide-card h3 { margin: .9rem 0 .45rem; }
.product-card h3 { font-family: var(--serif); font-size: clamp(1.4rem, 2.3vw, 2rem); font-weight: 400; letter-spacing: -.035em; }
.product-card p, .guide-card p, .step p { margin-bottom: .8rem; color: var(--ink-secondary); }
.product-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 17px;
  background: var(--mist);
  color: var(--evergreen);
}
.product-icon svg { width: 28px; height: 28px; }
.product-card:nth-child(2) .product-icon { background: #f4e9d2; }
.product-card:nth-child(3) .product-icon { background: #e6efed; }
.text-link { display: inline-flex; gap: .4rem; align-items: center; color: var(--evergreen); font-weight: 730; text-decoration: underline; text-decoration-color: #aab9ad; }
.product-card .text-link, .guide-card .text-link { margin-top: auto; align-self: flex-start; }
.text-link:hover { text-decoration-color: currentColor; }
.text-link svg { width: 1rem; height: 1rem; }
.other-products { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-top: 1.55rem; padding: 0; list-style: none; }
.other-products > strong { margin-right: .25rem; font-size: .9rem; }
.other-products a { display: inline-flex; align-items: center; min-height: 38px; padding: .35rem .8rem; border: 1px solid #ccd4c7; border-radius: 999px; background: var(--paper); color: var(--evergreen); font-size: .9rem; font-weight: 650; text-decoration: none; }
.other-products a:hover { background: var(--mist); border-color: var(--evergreen); }

.process { background: var(--mist); }
.steps { margin: 0; padding: 0; list-style: none; }
.step { padding: .9rem 1.15rem .6rem 0; border-top: 1px solid #bbc9be; }
.step h3 { margin: .6rem 0 .45rem; font-size: 1.23rem; }
.step > svg { width: 42px; height: 42px; border-radius: 12px; padding: 9px; background: var(--white); color: var(--evergreen); }
.step > span:first-child, .step-number {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 34px;
  padding: .25rem .4rem;
  border-radius: 50%;
  background: var(--evergreen);
  color: var(--white);
  font-size: .84rem;
  font-weight: 700;
}
.guide-strip { background: #f3f0e6; }
.guide-strip .guide-grid + p { margin-top: 1.2rem; }
.guide-card h3 { font-size: 1.16rem; }
.guide-card h3 a { color: var(--navy); text-decoration: none; }
.guide-card h3 a:hover { text-decoration: underline; }
.guide-card > svg { width: 27px; height: 27px; color: var(--evergreen); }

.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1.15rem; align-items: start; }
.faq-item { min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.faq-grid > div > .faq-item + .faq-item { margin-top: .75rem; }
.faq-item summary {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .65rem;
  min-height: 53px;
  padding: .72rem .95rem;
  font-weight: 690;
  line-height: 1.4;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; flex: none; color: var(--evergreen); font-size: 1.28rem; line-height: 1; }
.faq-item[open] summary::after { content: '−'; }
.faq-item summary svg { display: none; }
.faq-item p { padding: 0 .95rem .95rem; color: var(--ink-secondary); }
.faq-item > div { padding: 0 .95rem .95rem; }
.faq-item > div p { padding: 0; }

.band { padding-block: clamp(2.7rem, 6vw, 4.7rem); background: var(--evergreen); color: var(--white); }
.band-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.8rem; }
.band h2 { max-width: 24ch; }
.band p:not(.eyebrow) { max-width: 58ch; margin-top: .7rem; color: #e0ebe2; }
.band .eyebrow { color: var(--gold); }
.band .button { flex: none; }

.site-footer { background: var(--navy); color: #dce5e4; padding-block: 3rem 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.45fr 1fr 1fr; gap: clamp(1rem, 4vw, 2.6rem); }
.site-footer .brand { margin: 0 0 .9rem; color: var(--white); }
.site-footer .brand-mark { background: #294d48; }
.site-footer .brand-dot { color: var(--gold); }
.site-footer h2, .site-footer h3, .site-footer strong { color: var(--white); }
.site-footer h2, .site-footer h3 { margin: 0 0 .55rem; font: 700 .94rem/1.35 var(--sans); letter-spacing: normal; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--gold); }
.site-footer p, .site-footer li { font-size: .9rem; }
.site-footer li + li { margin-top: .38rem; }
.footer-partner { margin-top: 1.8rem; padding: .82rem 1rem; border: 1px solid #456063; border-radius: 12px; color: #eef6ee; }
.footer-partner p + p { margin-top: .35rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin-top: 1.35rem; padding-top: 1.05rem; border-top: 1px solid #3c5361; color: #c4d2d3; font-size: .85rem; }
.footer-bottom p { font-size: inherit; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: .45rem 1rem; }

.crumbs { padding-block: .9rem; color: var(--ink-secondary); font-size: .875rem; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; list-style: none; padding: 0; margin: 0; }
.crumbs li + li::before { content: '/'; margin-right: .55rem; color: #7a8483; }
.article-hero { position: relative; padding-block: clamp(2.3rem, 6vw, 4.6rem); background: var(--mist); }
.article-hero h1 { max-width: 21ch; font-size: clamp(2.65rem, 5.3vw, 4.35rem); }
.article-hero p:not(.eyebrow) { max-width: 68ch; margin-top: 1.05rem; color: var(--ink-secondary); font-size: 1.12rem; }
.article-hero .button { margin-top: 1.25rem; }
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, .55fr); gap: clamp(1.8rem, 5vw, 4.5rem); align-items: start; }
.article-body { min-width: 0; }
.article-body section + section { margin-top: 2rem; }
.article-body h2, .page-simple h2 { margin: 0 0 .7rem; font-size: clamp(1.75rem, 3vw, 2.5rem); }
.article-body p, .page-simple p { max-width: 72ch; color: var(--ink-secondary); }
.article-body p + p, .page-simple p + p { margin-top: .8rem; }
.article-body ul, .page-simple ul { padding-inline-start: 1.35rem; margin: .75rem 0 1.1rem; color: var(--ink-secondary); }
.article-body li + li, .page-simple li + li { margin-top: .42rem; }
.article-body h2:not(:first-child), .page-simple h2:not(:first-child) { margin-top: 1.5rem; }
.article-body .faq-grid { grid-template-columns: minmax(0, 1fr); margin-top: 1rem; }
.article-aside { min-width: 0; padding: clamp(1.1rem, 2.6vw, 1.6rem); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.article-aside h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); }
.article-aside p { margin-top: .7rem; color: var(--ink-secondary); }
.article-aside .button { margin-top: .9rem; }
.article-aside .form-action .button { margin-top: 0; }
.page-simple { padding-block: clamp(2.8rem, 7vw, 5rem); }
.page-simple h1 { max-width: 20ch; margin-bottom: 1rem; font-size: clamp(2.65rem, 5.3vw, 4.35rem); }
.page-simple .lead-form { max-width: 740px; }

.lead-form { margin-top: 1.2rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.form-field { display: flex; flex-direction: column; min-width: 0; gap: .35rem; }
.form-field label, .form-field > span, .lead-form legend { font-size: .91rem; font-weight: 690; }
.form-field small { color: var(--ink-secondary); font-size: .8125rem; font-weight: 500; }
.form-field input:not([type='checkbox']):not([type='radio']), .form-field select, .form-field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #aebcb1;
  border-radius: 9px;
  background-color: var(--white);
  color: var(--navy);
  padding: .55rem .65rem;
  line-height: 1.35;
}
.form-field select {
  appearance: none;
  padding-inline-end: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m3 6 5 5 5-5' stroke='%23204a43' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .65rem center;
  background-size: 14px;
}
.form-field textarea { min-height: 100px; resize: vertical; }
.form-field input[type='checkbox'], .form-field input[type='radio'] { accent-color: var(--evergreen); }
.form-field input::placeholder, .form-field textarea::placeholder { color: #687674; opacity: 1; }
.form-grid .wide { grid-column: 1 / -1; }
.form-note { margin: .85rem 0; color: var(--ink-secondary); font-size: .88rem; line-height: 1.55; }
.form-grid .form-note { margin: -.35rem 0 0; }
[data-preview='1'] > .form-note:first-of-type { padding: .65rem .8rem; border-radius: 9px; background: var(--cream); }
.form-action { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin-top: 1rem; }
.form-result { margin-block: .6rem 1rem; padding: .75rem .9rem; border: 1px solid #aec5b1; border-radius: 10px; background: var(--mist); color: var(--evergreen-deep); font-weight: 630; }
.form-result:empty { display: none; }
.form-result.error, .form-result.is-error, .form-result[role='alert'] { border-color: #d9b8a4; background: #fff5ea; color: #7b351d; }
.form-trap { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.screen-reader-text, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}
.skip-link:focus, .screen-reader-text:focus {
  position: fixed;
  top: .65rem;
  left: .65rem;
  z-index: 10;
  width: auto;
  height: auto;
  padding: .65rem 1rem;
  clip: auto;
  clip-path: none;
  border-radius: .45rem;
  background: var(--white);
  color: var(--navy);
}

@media (max-width: 980px) {
  .header-row { gap: .85rem; }
  .site-nav, .site-nav ul { gap: .85rem; }
  .hero-grid { gap: 2rem; }
  .hero-break { display: none; }
  .article-grid { gap: 1.5rem; }
  .article-aside .form-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 2.25rem); }
  .header-row { min-height: 65px; flex-wrap: wrap; gap: .46rem; }
  .brand { margin-right: auto; font-size: 1.55rem; }
  .brand-mark { width: 32px; height: 32px; }
  .menu-toggle { display: grid; place-items: center; }
  .site-nav { display: none; order: 4; flex: 0 0 100%; padding: 0 0 .65rem; }
  .site-nav.is-open, .site-nav.open, .site-nav[data-open='true'], .site-nav[aria-hidden='false'], .menu-toggle[aria-expanded='true'] ~ .site-nav, .header-row:has(.menu-toggle[aria-expanded='true']) .site-nav { display: flex; }
  .site-nav, .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { display: flex; width: 100%; }
  .site-nav a + a, .site-nav li + li { border-top: 1px solid #ebede7; }
  .header-cta.button, .header-cta .button { min-height: 40px; padding: .44rem .73rem; font-size: .82rem; }
  .hero-grid, .article-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-block: 2.5rem 3.4rem; }
  .hero-copy h1 { max-width: 13ch; }
  .hero-photo { margin-right: .45rem; }
  .hero-photo img { aspect-ratio: 1.43; }
  .hero-photo::before { right: -8px; bottom: -8px; }
  .cards, .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-aside .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band-inner { align-items: flex-start; flex-direction: column; gap: 1rem; }
}

@media (max-width: 520px) {
  .shell { width: calc(100% - 1.85rem); }
  .hero-actions .button { min-height: 46px; padding-inline: .9rem; }
  .cards, .steps, .guide-grid, .faq-grid, .form-grid, .article-aside .form-grid { grid-template-columns: minmax(0, 1fr); }
  .step { padding-right: 0; }
  .site-footer { padding-top: 2rem; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
