/* =============================================================================
   ORIVANA v2 · shared components
   ========================================================================== */

/* ---------------------------------------------------------------- page hero (inner pages) */
.ph { position: relative; overflow: hidden; background: var(--g900); color: var(--on-dark); padding: calc(var(--hdr) + clamp(48px, 7vw, 120px)) 0 clamp(56px, 6vw, 96px); isolation: isolate; }
.ph__crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: clamp(28px, 4vw, 56px); font-size: .86rem; color: var(--on-dark-3); }
.ph__crumb a:hover { color: var(--apricot); }
.ph__crumb i { width: 18px; height: 1px; background: currentColor; opacity: .6; }
.ph__crumb b { font-weight: 560; color: var(--on-dark); }

/* ---------------------------------------------------------------- section head */
.shead { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 96px); align-items: end; margin-bottom: clamp(48px, 6vw, 96px); }
@media (max-width: 900px) { .shead { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- segmented control */
.seg { position: relative; display: inline-flex; flex-wrap: wrap; gap: 0; padding: 5px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); isolation: isolate; }
.on-dark .seg, .seg--d { background: rgba(255, 255, 255, .05); border-color: var(--line-d); }
.seg__pill { position: absolute; left: 0; top: 0; z-index: -1; border-radius: 999px; background: var(--ink); transition: transform .6s var(--e-out), width .6s var(--e-out), height .6s var(--e-out); }
.on-dark .seg__pill, .seg--d .seg__pill { background: var(--apricot); }
.seg__b { position: relative; padding: 11px 20px; border-radius: 999px; font-size: .92rem; font-weight: 560; font-stretch: 106%; color: var(--ink-2); transition: color .4s; white-space: nowrap; }
.seg__b.is-on { color: var(--on-dark); }
.on-dark .seg__b, .seg--d .seg__b { color: var(--on-dark-2); }
.on-dark .seg__b.is-on, .seg--d .seg__b.is-on { color: var(--ink); }
@media (max-width: 560px) { .seg { border-radius: 22px; } .seg__b { padding: 10px 14px; font-size: .86rem; } }

/* ---------------------------------------------------------------- accordion */
.acc__i { border-top: 1px solid var(--line); }
.acc__i:last-child { border-bottom: 1px solid var(--line); }
.acc__b { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; text-align: left; font-size: clamp(1.08rem, 1rem + .4vw, 1.35rem); font-weight: 600; font-stretch: 106%; letter-spacing: -.015em; }

/* ---------------------------------------------------------------- spec list / tables */
.spec { display: grid; border-top: 1px solid var(--line); }
.spec > div { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.spec dt { color: var(--ink-3); }
.on-dark .spec dt { color: var(--on-dark-3); }
.spec dd { font-weight: 560; }
.tbl-w { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--white); -webkit-overflow-scrolling: touch; }
.on-dark .tbl-w { background: rgba(255, 255, 255, .03); }
.tbl { width: 100%; min-width: 720px; border-collapse: collapse; font-size: .95rem; }
.tbl th { padding: 16px 20px; text-align: left; font-size: .72rem; font-weight: 640; font-stretch: 125%; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); background: var(--paper); }
.on-dark .tbl th { background: rgba(255, 255, 255, .04); color: var(--on-dark-3); }
.tbl td { padding: 18px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .3s; }
.tbl tbody tr:hover, .tbl tbody tr.is-on { background: color-mix(in srgb, var(--g300) 14%, transparent); }
.tbl b, .tbl strong { font-weight: 620; }
.tbl small { display: block; color: var(--ink-3); font-size: .82rem; margin-top: 3px; }
.on-dark .tbl small { color: var(--on-dark-3); }
.tag { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; font-size: var(--t-sm); font-weight: 620; font-stretch: 112%; background: color-mix(in srgb, var(--g300) 24%, transparent); color: var(--g700); white-space: nowrap; }
.on-dark .tag { color: var(--g200); }
.tag--a { background: color-mix(in srgb, var(--apricot) 26%, transparent); color: #7A4A0B; }
.on-dark .tag--a { color: var(--apricot); }

/* ---------------------------------------------------------------- cards (used sparingly) */
.card { position: relative; border-radius: var(--r); background: var(--white); border: 1px solid var(--line); padding: clamp(24px, 2.6vw, 36px); transition: border-color .4s, box-shadow .5s var(--e-out), transform .6s var(--e-out); }
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.on-dark .card, .card--d { background: rgba(255, 255, 255, .035); border-color: var(--line-d); color: var(--on-dark); }
.on-dark .card:hover { border-color: var(--line-d2); }
[data-glow] { --gx: 50%; --gy: 50%; }
[data-glow]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(420px circle at var(--gx) var(--gy), color-mix(in srgb, var(--apricot) 14%, transparent), transparent 60%); opacity: 0; transition: opacity .5s; }
[data-glow]:hover::after { opacity: 1; }

/* ---------------------------------------------------------------- media frame */
.frame { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--g800); }
.frame img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- loupe (inspect) */
[data-loupe] { position: relative; overflow: hidden; }
.lens { position: absolute; left: 0; top: 0; width: 220px; height: 220px; margin: -110px 0 0 -110px; border-radius: 50%; pointer-events: none; background-repeat: no-repeat; box-shadow: 0 0 0 1px rgba(255, 255, 255, .6), 0 0 0 7px rgba(7, 21, 15, .25), 0 30px 60px rgba(0, 0, 0, .45); transform: scale(.4); opacity: 0; transition: transform .45s var(--e-out), opacity .3s; z-index: 3; }
[data-loupe].is-lens .lens { transform: scale(1); opacity: 1; }

/* ---------------------------------------------------------------- reel */

/* ---------------------------------------------------------------- forms */
.form { display: grid; gap: 22px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.form-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .form-row, .form-row--3 { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 8px; }
.field > label, .field > .flabel { font-size: .88rem; font-weight: 580; font-stretch: 104%; color: var(--ink-2); }
.on-dark .field > label, .on-dark .field > .flabel { color: var(--on-dark-2); }
.field .req { color: var(--apricot-d); }
.input, .select, .textarea { width: 100%; min-height: 54px; padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--white); color: var(--ink); font-size: 1rem; transition: border-color .3s, box-shadow .3s; }
.textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333473C' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 16px; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--g600); box-shadow: 0 0 0 4px color-mix(in srgb, var(--g300) 35%, transparent); }
.on-dark .input, .on-dark .select, .on-dark .textarea { background: rgba(255, 255, 255, .05); border-color: var(--line-d2); color: var(--on-dark); }
.on-dark .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2F7F3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.on-dark .select option { color: var(--ink); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: .75; }
.field.is-err .input, .field.is-err .select, .field.is-err .textarea { border-color: var(--err); box-shadow: 0 0 0 4px color-mix(in srgb, var(--err) 18%, transparent); }
.field__err { font-size: .82rem; color: var(--err); }
.hint { font-size: .82rem; color: var(--ink-3); }
.opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); font-size: .92rem; font-weight: 540; cursor: pointer; transition: background .3s, border-color .3s, color .3s; }
.opt span::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--ink-3); transition: background .3s, border-color .3s; }
.opt input[type=radio] + span::before { border-radius: 50%; }
.opt input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.opt input:checked + span::before { background: var(--apricot); border-color: var(--apricot); }
.opt input:focus-visible + span { outline: 2px solid var(--apricot); outline-offset: 2px; }
.drop { position: relative; display: grid; place-items: center; gap: 6px; min-height: 130px; padding: 22px; border-radius: var(--r); border: 1.5px dashed var(--line-2); background: var(--white); text-align: center; color: var(--ink-2); cursor: pointer; transition: border-color .3s, background .3s; }
.drop:hover, .drop.is-over { border-color: var(--g500); background: color-mix(in srgb, var(--g300) 10%, var(--white)); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop svg { width: 24px; height: 24px; color: var(--g600); }
.drop b { font-weight: 600; color: var(--ink); }
.fstat { display: none; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: var(--r-sm); font-size: .92rem; line-height: 1.5; }
.fstat.is-on { display: flex; }
.fstat.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: #1d5a37; }
.fstat.err { background: color-mix(in srgb, var(--err) 12%, transparent); color: #8f2e1c; }
.on-dark .fstat.ok { color: var(--g200); }
.on-dark .fstat.err { color: #ffb4a3; }
.fpanel { border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); padding: clamp(24px, 3.4vw, 52px); box-shadow: var(--shadow-1); }
.fdone { display: grid; gap: 18px; justify-items: start; padding: clamp(28px, 4vw, 56px) 0; }
.fdone__ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--apricot); color: var(--ink); }
.fdone__ic svg { width: 28px; height: 28px; }
.fdone__ref { font-weight: 640; font-stretch: 112%; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--g700); flex: none; }

/* ---------------------------------------------------------------- modal */
.modal { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: var(--gut); visibility: hidden; }
.modal.is-open { visibility: visible; }
.modal__bg { position: absolute; inset: 0; background: rgba(7, 21, 15, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .5s; }
.modal.is-open .modal__bg { opacity: 1; }
.modal__box { position: relative; width: min(560px, 100%); max-height: calc(100vh - 2 * var(--gut)); overflow-y: auto; border-radius: var(--r-lg); background: var(--white); padding: clamp(24px, 3.4vw, 44px); box-shadow: var(--shadow-3); transform: translateY(30px) scale(.97); opacity: 0; transition: transform .6s var(--e-out), opacity .4s; }
.modal.is-open .modal__box { transform: none; opacity: 1; }
.modal__x { position: absolute; right: 16px; top: 16px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--paper); }
.modal__x svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- misc */
.ticks li { position: relative; padding-left: 30px; }
.ticks li + li { margin-top: 12px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border-radius: 50%; background: var(--g300) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A4331' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat; }
.live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(63, 166, 107, .5); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 10px rgba(63, 166, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 166, 107, 0); } }
@media (max-width: 600px) {
}
