/* Hanken Grotesk, served from this site (OFL licence in fonts/OFL.txt) */
@font-face { font-family: 'Hanken Grotesk'; font-weight: 300; font-style: normal; font-display: swap; src: url('fonts/hankengrotesk-light.ttf') format('truetype'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/hankengrotesk-regular.ttf') format('truetype'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/hankengrotesk-medium.ttf') format('truetype'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/hankengrotesk-semibold.ttf') format('truetype'); }

/* Avesso Group brand tokens (Azulejo, guide v1.0) */
:root {
  --green: #2D452F;
  --green-dark: #1C2A1E;
  --cream: #F1EDE6;
  --paper: #F8F5EE;
  --grey-green: #7B827A;
  --stone: #E3DED3;
  --sand: #D6CDBD;
  --rule: #C9CCC6;
  --white: #FFFFFF;
  --radius: 8px;
  --gutter: 48px;
  /* Depth: brand green fading into the dark green, with a soft cream light */
  --grad-green: linear-gradient(150deg, #2D452F 0%, #2D452F 35%, #1C2A1E 100%);
  --glow: radial-gradient(70% 90% at 90% -10%, rgba(241, 237, 230, 0.09) 0%, rgba(241, 237, 230, 0) 60%);
  --shadow-sm: 0 1px 2px rgba(28, 42, 30, 0.05), 0 4px 14px rgba(28, 42, 30, 0.05);
  --shadow-md: 0 2px 6px rgba(28, 42, 30, 0.06), 0 14px 32px rgba(28, 42, 30, 0.10);
  --shadow-green: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 34px rgba(28, 42, 30, 0.28);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--white);
  color: var(--green-dark);
  font-family: 'Hanken Grotesk', Arial, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-green);
}

/* TOP (header + hero share one lit green surface) */
.top {
  background: var(--glow), var(--grad-green);
  position: relative;
  overflow: hidden;
}

.top::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(241, 237, 230, 0) 0%, rgba(241, 237, 230, 0.25) 50%, rgba(241, 237, 230, 0) 100%);
}

/* HEADER */
header {
  padding: 28px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

header img { width: 240px; height: auto; display: block; }
header .eyebrow { color: var(--white); }

/* HERO */
.hero {
  padding: 24px var(--gutter) 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: end;
}

.hero h1 {
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 300;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.01em;
  max-width: 640px;
}

.hero h1 strong { font-weight: 600; }

.hero p {
  margin-top: 16px;
  color: var(--white);
  font-size: 15px;
  max-width: 520px;
}

.note-banner {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--white);
}

.note-banner svg { flex-shrink: 0; }

.hero-tile-wrap {
  position: relative;
  padding: 28px;
}

.hero-tile-wrap::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(closest-side, rgba(241, 237, 230, 0.22), rgba(241, 237, 230, 0));
}

.hero-tile {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18), 0 24px 48px rgba(0, 0, 0, 0.35);
  animation: rise 0.9s var(--ease) both 0.15s;
}

.hero > div:first-child > * { animation: rise 0.7s var(--ease) both; }
.hero > div:first-child > *:nth-child(2) { animation-delay: 0.06s; }
.hero > div:first-child > *:nth-child(3) { animation-delay: 0.12s; }
.hero > div:first-child > *:nth-child(4) { animation-delay: 0.18s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.steps {
  list-style: none;
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 13px;
}

.steps b {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* LAYOUT */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: calc(100vh - 320px);
}

.sections-panel {
  padding: 40px var(--gutter);
  border-right: 1px solid var(--rule);
}

.panel-title { margin-bottom: 24px; }

/* WORK ITEMS */
.work-item {
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: var(--white);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s, box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.work-item:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.work-item.active {
  border-color: var(--green);
  box-shadow: var(--shadow-md);
  transform: none;
}

.work-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.work-header:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }

.work-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--sand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.work-item.active .work-num {
  background: var(--grad-green);
  border-color: var(--green);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(28, 42, 30, 0.25);
}

.work-title { flex: 1; }

.work-title strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--green-dark);
}

.work-title small { font-size: 13px; color: var(--grey-green); }

.work-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  white-space: nowrap;
}

.work-toggle {
  color: var(--green);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.work-item.active .work-toggle { transform: rotate(180deg); }

.work-body {
  display: none;
  padding: 4px 20px 20px;
  border-top: 1px solid var(--stone);
}

.work-item.active .work-body { display: block; animation: reveal 0.35s var(--ease); }

@keyframes reveal {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.field-row.single { grid-template-columns: 1fr; }

label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-green);
  margin-bottom: 6px;
}

input[type="number"], select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--sand);
  border-radius: 4px;
  background: var(--white);
  font-family: inherit;
  font-size: 16px; /* 16px stops iOS from zooming on focus */
  color: var(--green-dark);
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%232D452F' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

input[type="number"]:focus, select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45, 69, 47, 0.12);
}

input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--sand);
  border-radius: 4px;
  background: var(--white);
  font-family: inherit;
  font-size: 16px;
  color: var(--green-dark);
  outline: none;
}

input[type="text"]:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(45, 69, 47, 0.12); }

.auto-calc {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px dashed var(--sand);
  border-radius: 4px;
  font-size: 13px;
  color: var(--grey-green);
}

.auto-calc strong { color: var(--green); font-weight: 600; }

.section-estimate {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--glow), var(--grad-green);
  box-shadow: var(--shadow-green);
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-estimate span { font-size: 13px; color: var(--sand); }
.section-estimate strong { font-size: 17px; color: var(--cream); font-weight: 600; }

/* SUMMARY */
.summary-panel {
  padding: 40px 32px;
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  align-self: start;
}

.summary-items { list-style: none; }

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--stone);
  gap: 12px;
  animation: rise 0.4s var(--ease) both;
}

.summary-item-name { font-size: 14px; line-height: 1.4; }

.summary-item-name small {
  display: block;
  font-size: 12px;
  color: var(--grey-green);
  margin-top: 2px;
}

.summary-item-value { font-size: 14px; font-weight: 600; white-space: nowrap; }

.empty-state {
  text-align: center;
  padding: 40px 8px;
  color: var(--grey-green);
  font-size: 14px;
}

.empty-state img { width: 44px; opacity: 0.5; margin-bottom: 16px; }

.total-box {
  margin-top: 24px;
  background: var(--glow), var(--grad-green);
  box-shadow: var(--shadow-green);
  border-radius: 12px;
  padding: 22px 22px 20px;
}

.total-box .eyebrow { color: var(--sand); margin-bottom: 6px; }

.total-amount {
  font-size: 40px;
  font-weight: 300;
  color: var(--cream);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.total-range { font-size: 12px; color: var(--sand); margin-top: 8px; }
.total-range strong { color: var(--cream); font-weight: 600; }

.cta-block { margin-top: 20px; }

.btn {
  width: 100%;
  padding: 14px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}

.btn-primary {
  background: var(--grad-green);
  color: var(--white);
  border: 1px solid var(--green);
  box-shadow: 0 6px 16px rgba(28, 42, 30, 0.22);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(28, 42, 30, 0.28); }

.btn-secondary {
  margin-top: 8px;
  background: transparent;
  color: var(--green);
  border: 1px solid var(--sand);
}

.btn-secondary:hover { border-color: var(--green); }

.btn-disabled {
  margin-top: 8px;
  background: var(--stone);
  color: var(--grey-green);
  border: 1px dashed var(--sand);
  cursor: not-allowed;
}

.tag-soon {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--paper);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.contact-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--grey-green);
  text-align: center;
}

.price-status {
  margin-top: 16px;
  padding: 10px 12px;
  border-left: 3px solid var(--sand);
  background: var(--white);
  font-size: 12px;
  color: var(--grey-green);
}

/* MOBILE TOTAL BAR */
.mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--glow), var(--grad-green);
  box-shadow: 0 -10px 30px rgba(28, 42, 30, 0.18);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 10;
  transition: transform 0.35s var(--ease);
}

.mobile-bar.is-hidden { transform: translateY(110%); }

.mobile-bar .eyebrow { color: var(--sand); font-size: 10px; }
.mobile-bar strong { display: block; color: var(--cream); font-size: 22px; font-weight: 600; line-height: 1.1; }

.mobile-bar a {
  color: var(--green);
  background: var(--cream);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: 4px;
}

/* FOOTER */
footer {
  background: var(--grad-green);
  padding: 28px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

footer p { font-size: 12px; color: var(--sand); }
footer .claim { color: var(--white); font-size: 14px; }

/* PDF DETAILS (consultant fills in before printing) */
.pdf-details {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  background: var(--paper);
}

.pdf-details .field-row:first-of-type { margin-top: 10px; }

.contact-card {
  margin-top: 16px;
  font-size: 13px;
  color: var(--green-dark);
}

.contact-card div { margin-top: 2px; }
.contact-card .todo { color: var(--grey-green); font-style: italic; }

.print-only { display: none; }

/* PRINT: only the summary, on a clean page */
@media print {
  @page { margin: 18mm; }
  body { background: var(--white); }
  .top, .sections-panel, footer, .cta-block, .mobile-bar, .price-status, .pdf-details { display: none !important; }
  .print-only.print-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; font-size: 13px; }
  .print-meta .eyebrow { display: block; margin-bottom: 2px; }
  .print-only.print-contacts { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
  .print-contacts strong { display: block; font-size: 13px; color: var(--green); margin-bottom: 4px; }
  .summary-item { animation: none; }
  .main-layout { display: block; }
  .summary-panel { position: static; max-height: none; overflow: visible; padding: 0; }
  .print-only { display: block; }
  .print-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 14px;
    margin-bottom: 24px;
  }
  .print-head img { width: 240px; }
  .print-foot { margin-top: 24px; font-size: 11px; color: var(--grey-green); }
  .total-box, .section-estimate { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (max-width: 900px) {
  :root { --gutter: 16px; }
  header { padding: 20px var(--gutter); }
  header .eyebrow { display: none; }
  .hero { grid-template-columns: 1fr; padding: 16px var(--gutter) 40px; }
  .hero-tile-wrap { display: none; }
  .steps li { font-size: 12px; }
  .main-layout { grid-template-columns: 1fr; }
  .sections-panel { padding: 28px var(--gutter); border-right: none; border-bottom: 1px solid var(--rule); }
  .summary-panel { padding: 28px var(--gutter) 120px; position: static; max-height: none; }
  .work-header { padding: 14px 16px; gap: 12px; }
  .work-body { padding: 4px 16px 16px; }
  .field-row { grid-template-columns: 1fr; }
  body.has-total .mobile-bar { display: flex; }
  footer { flex-direction: column; align-items: flex-start; padding-bottom: 96px; }
}

.btn-print { margin-top: 16px; }
